import math
def survival_years(total, monthly_spend, annual_return=0.05):
"""
Returns how many years you can survive.
If survival is infinite, returns -1.
"""
yearly_spend = monthly_spend * 12
# No growth case
if annual_return == 0:
return total /...