n = int(input()) li =[ 1, 2, 6, 24] if n in li: print(1) else: print(0)