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