output_description: Print the answer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: def main():
      import sys
  
      input = sys.stdin.readline
      sys.setrecursionlimit(10**7)
      from collections import Counter, deque
      from collections import defaultdict
      from itertools import combinations, permutations, accumulate, groupby, product
      from bisect import bisect_left, bisect_right
      from heapq import heapify, heappop, heappush
      from math import floor, ceil, pi, factorial
      from operator import itemgetter
  
      def I():
          return int(input())
  
      def MI():
          return map(int, input().split())
  
      def LI():
          return list(map(int, input().split()))
  
      def LI2():
          return [int(input()) for i in range(n)]
  
      def MXI():
          return [[LI()] for i in range(n)]
  
      def SI():
          return input().rstrip()
  
      def printns(x):
          print("\n".join(x))
  
      def printni(x):
          print("\n".join(list(map(str, x))))
  
      inf = 10**17
      mod = 10**9 + 7
      # main code here!
      s = SI()
      count = 0
      for i in range(4):
          if s[i] == "2":
              count += 1
      print(count)
  
  
  if __name__ == "__main__":
      main()
  
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"}]