import math n = int(input()) r = (n / 3) ** (-2) r_ans = math.floor(r + 10 ** 6) print(r_ans)