output_description: Print the answer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: n=input()
  ans=0
  for i in range(4):
    if n[i]="2":
      ans+=1
  print(ans)
problem_description: Statement
  
  You are given an integer N that has exactly four digits in base ten. How many
  times does `2` occur in the base-ten representation of N?
samples: [{"input": "1222", "output": "3\n    \n\n`2` occurs three times in `1222`. By the way, this contest is held on December\n22 (JST).\n\n* * *"}, {"input": "3456", "output": "0\n    \n\n* * *"}, {"input": "9592", "output": "1"}]