N=int(int(input)('Введитте число') s=0 while N!=0: c=N%10 s+=c N//=10 if s%2==1: print(1) else: print(2)