def monthlyCalc(balance, annualInterestRate, monthlyPaymentRate):
  """
  input: balance at the start of month
         annualInterestRate
         monthlyPaymentRate
  output: balance at the end of 1 month
  """
  balance = balance - monthlyPaymentRate * balance
  balance = balance + (annualInterestRate/12) * balance
  return balance