
def PGSimplific1a():
    a = int(input())
    b = a
    c = b + b * b
    x = int(input())
    e = 4 * x
    s = e + b
    s = s * s + c
    f = s
    print("Le resultat est ", f, sep="")

PGSimplific1a()