for x in input():print(~x.encode()[0]>>5&1)