K = int(input()) print(2 + 4 * K**2)