def main(): a,b,c=input().split() if a=='?': if int(b)int(b): print(4) else: print(1) if __name__=="__main__": main()