fork download
  1. s=k=0
  2. N=int(input())
  3. while N!=0:
  4. K=N%10
  5. s+=k
  6. N//=10
  7. if s% 2==1:
  8. print(1)
  9. else:
  10. print(2)
  11.  
  12.  
Success #stdin #stdout 0.09s 14152KB
stdin
48 
56
stdout
2