import math


def annuity_payment(P, n, i):
    """Finding the annuity payment (monthly) using:
    P = credit principal
    n = number of payments (months)
    i = nominal (monthly) interest rate (float, not a percentage)
    Returns formatted string"""
    P = int(P)
    n = int(n)
    i = float(i) / (100 * 12)
    A = math.ceil(P * (i * math.pow(1 + i, n)) / (math.pow(1 + i, n) - 1))
    overpayment = (n * A) - P
    res = f'Your annuity payment = {A}!\nOverpayment = {overpayment}'
    return res