n = int(input()) result = 316 + (n - 1) * 52 print(result)