In a tree of n cities with an entry cost per city and m dollars, starting from city 0, find the maximum number of cities you can visit
Represent the tree with n and an edge list. Visiting a city pays its entry cost once, and every visited city must be reachable from city 0 through visited cities. Return the maximum number of visited cities, or 0 if city 0 cannot be entered.
max_cities(n, edges, entry_cost, m) returns an integer.
def max_cities(n, edges, entry_cost, m):