def main(): K = int(input()) if K%2==0 or K%3==0: print(1/36) else: print(0) if __name__ == '__main__': main()