The input contains a single integer *a* (10 ≤ *a* ≤ 999).

Output 0 or 1.
The input contains a single integer *a* (10 ≤ *a* ≤ 999).
none
13
1
927
1
48
0
10
0
999
1
142
0
309
1
572
0
835
1
990
0
168
0
431
1
694
0
957
1
932
0
"""
https://codeforces.com/contest/952/problem/A

Input
    The input contains a single integer a (10 ≤ a ≤ 999).

Output
    0 or 1.
"""
from sys import stdin, stdout


def april_fools_2018_A(a: int) -> int:
    return int(a % 3 == 0)


if __name__ == "__main__":
    a = int(stdin.readline())

    stdout.write(when_daniel_met_vlad(n, a, x, b, y) + "\n")
