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