N = int(input()) ans = 0 while True: if N % 3 == 0: print(ans) exit() ans += 1 N -= 2