import sys L = [ int(l[:-1]) for l in sys.stdin.readlines() ] Z = zip(L, L[1:], L[2:]) M = [ a+b+c for (a,b,c) in Z] Y = zip(M, M[1:]) P = [ [0,1][a