
    Calculate the maximum potential maintenance cost for a vehicle by comparing the current mileage-based cost against the sum of maintenance costs at fractional mileage intervals (half, third, quarter, and fifth of current mileage), where each interval represents different component maintenance schedules. The maintenance cost function f(n) for a vehicle with mileage n should return the maximum value between the current mileage-based cost n and the sum of maintenance costs at these fractional intervals (f(n/2) + f(n/3) + f(n/4) + f(n/5)).
    

    
def get_max_sum(n):
    """
    Calculate the maximum potential maintenance cost for a vehicle by comparing the current mileage-based cost against the sum of maintenance costs at fractional mileage intervals (half, third, quarter, and fifth of current mileage), where each interval represents different component maintenance schedules. The maintenance cost function f(n) for a vehicle with mileage n should return the maximum value between the current mileage-based cost n and the sum of maintenance costs at these fractional intervals (f(n/2) + f(n/3) + f(n/4) + f(n/5)).
    

    """
def get_max_sum(n):
    """
    Calculate the maximum potential maintenance cost for a vehicle by comparing the current mileage-based cost against the sum of maintenance costs at fractional mileage intervals (half, third, quarter, and fifth of current mileage), where each interval represents different component maintenance schedules. The maintenance cost function f(n) for a vehicle with mileage n should return the maximum value between the current mileage-based cost n and the sum of maintenance costs at these fractional intervals (f(n/2) + f(n/3) + f(n/4) + f(n/5)).
    

    """
    res = list()
    res.append(0)
    res.append(1)
    i = 2
    while i < n + 1:
        res.append(max(i, res[int(i / 2)] + res[int(i / 3)] + res[int(i / 4)] + res[int(i / 5)]))
        i = i + 1
    return res[n]