l = [1, 1, 4, 5, 1, 4, 1, 9, 1, 9] print(l[int(input()) - 1])