def main():
    gas = int(input("How many gallons of gas does your tank hold: "))           #Collects how much gas
    mpg = int(input("What is your fuel efficiency in miles per gallon: "))      #collects the miles per gallon
    miles = int(input("How many miles is your trip: "))                         #Collects how long trip is

    #if statements to have boundaries for the input numbers
    if gas >= 100:                                                  #Gas must be less 100 gallons in a tank
        print("\nSorry that is too much gas for a tank hold.")
        print("Try again!\n")
        main()
    if mpg >= 100:                                                  #car cannot be that efficient
        print("\nLucky, your car is way to efficient to even exist.")
        print("Try again!\n")
        main()
    if miles >= 5000:                                               #the trip cannot be that long
        print("\nThere is no way you are driving over 5000 miles.")
        print("Try again!\n")
        main()
    
    eff = gas*mpg                                                   #calculates the total efficient

    if eff > miles:                                                 #if statement to calculate 0
        print("\nYou will not have to refuel.")                     #Print statement for zero refuels
    else:
        refuel = miles//eff                                         #callculates how many times you have to refill
        print("\nYou will  have to refuel",refuel,"time(s).")       #Prints how many times you have to refuel
main()