Problem:
 Score : 100 points    Problem 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 ?      Constraints  1000 \leq N \leq 9999         Input Input is given from Standard Input in the following format:  N       Output Print the answer.        Sample Input 1 1222      Sample Output 1 3  2 occurs three times in 1222 . By the way, this contest is held on December 22 (JST).       Sample Input 2 3456      Sample Output 2 0       Sample Input 3 9592      Sample Output 3 1

Solution (Python):
n=input()
count = 0
for i in n:
    if i == "2":
        count += 1
print(count)

Solution (Python):
a = list(input())
counter =0
for i in a:
    if i =='2':
        counter +=1
print(counter)

Solution (Python):
n = input()

cnt = 0
for s in n:
    if s == "2":
        cnt += 1

print(cnt)

Solution (Python):




def  counter2(forSizeInteger):
	forSizeString = str(forSizeInteger)
	counter = 0
	if(forSizeString[0]=='2'):
		counter = counter + 1
	if (forSizeString[1] == '2'):
		counter = counter + 1
	if (forSizeString[2] == '2'):
		counter = counter + 1
	if (forSizeString[3] == '2'):
		counter = counter + 1

	answer=counter

	return answer


if __name__ == '__main__':
	n = int(input())
	solution=counter2(n)
	print(solution)

Solution (Python):
def main():
    print(input().count("2"))
main()

Solution (Python):
A = str(input())
print(list(A).count('2'))

Solution (Python):
import sys

line = sys.stdin.readline().replace('\n', '')

cnt = 0
for i in line:
  if i == '2':
    cnt += 1

print (cnt)

Solution (Python):
def main(n):
  s=0
  if n%10==2:
    s+=1
  if (n%100)//10==2:
    s+=1
  if (n%1000)//100==2:
    s+=1
  if n>=2000 and n<=2999:
    s+=1
  return s
n=int(input())
print(main(n))

Solution (Python):
p = input()

i = 0
q = 0

while i < 4:
    if p[i] == "2":
        q+=1
    i+=1
print(q)

Solution (Python):
N = list(input())

count = 0
for i in N:
    if i == "2":
        count += 1
        
print(count)

Solution (Python):
n = input()
print(sum([1 if i == '2' else 0 for i in n]))

Solution (Python):
N = list(str(input()))
ans = 0
for i in range(4):
    if N[i] == '2':
        ans += 1

print(ans)

Solution (Python):
N = input()
print(N.count("2"))

Solution (Python):
n = input()
ans = 0
for i in range(4):
    if n[i] == "2":
        ans += 1
print(ans)

Solution (Python):
print(input().count('2'))

Solution (Python):
n = int(input())
li = []
while n > 0:
    li.append(n%10)
    n //= 10
li.reverse()
ans = 0
for i in range(len(li)):
    if li[i] == 2:
        ans += 1
print(ans)

Solution (Python):
a,b,c,d = map(int,input())

if a==2:
  e=1
else:
    e=0
    
if b==2:
  f=1
else:
    f=0
  
if c==2:
  g=1
else:
    g=0
    
if d==2:
  h=1
else:
    h=0
  
print(e+f+g+h)

Solution (Python):
print(list(input()).count("2"))

Solution (Python):


N = input()
print(N.count('2'))

Solution (Python):
n = int(input())
lst = []
while n > 0:
    lst.append(n % 10)
    n //= 10
print(lst.count(2))

Solution (Python):
a = input()
a = str(a)
b = 0
for i in range(len(a)):
    if a[i]=="2":
        b=b+1
    else:
        b=b
print(b)

Solution (Python):
print(input().count('2'))

Solution (Python):
n = int(input())
i = 0
flag = 0
m = [0,0,0,0]

m[0] = n // 1000
m[1] = n // 100 - m[0] * 10
m[2] = n // 10 - m[0] * 100 -  m[1] * 10
m[3] = n - m[0] * 1000 - m[1] * 100 - m[2] * 10

while i <= 3:
    if m[i] == 2 :
        flag = flag + 1
    i = i + 1
print(flag)

Solution (Python):
N=raw_input()

cnt=0
for x in N:
	if x=="2":cnt+=1

print cnt

Solution (Python):
S = input()
ans = []
count = 0
for i in range(len(S)):
    if int(S[i]) == 2:
        count += 1
print(count)

Solution (Python):
N = int(input())
ans = 0
for i in range(4):
 a = N%10
 if a==2:
  ans = ans+ 1
 N /= 10
 N = int(N)
print(ans)

Solution (Python):
from sys import stdin
N = stdin.readline().rstrip()

N=str(N)
o=0
if len(N)==4:
    if N[0]=="2": o+=1
    if N[1]=="2": o+=1  
    if N[2]=="2": o+=1  
    if N[3]=="2": o+=1  

print(o)

Solution (Python):
n=input()
c=0
for k in n:
    if k=="2":
        c+=1
print(c)

Solution (Python):
num = []
n = int(input())
while n != 0:
  num.append(n % 10)
  n //= 10
num.reverse()

count = 0

for i in range(len(num)):
    if num[i] == 2:
        count = count + 1

print(count)

Solution (Python):
x = input()
print(str(x).count("2"), flush=True)

Solution (Python):
a = int(input())
count = 0
lst = []
while a > 0:
  lst.append(a%10)
  a //= 10
lst.reverse()
for i in lst:
  if i == 2:
    count = count + 1
print(count)

Solution (Python):
N = str(input())
print(N.count(('2')))

Solution (Python):
N = str(input())
count = 0

for i in N:
  if i=="2":
     count += 1

print(count)

Solution (Python):
x = input()
cnt = 0
for i in range(4):
    cnt += 1 if x[i]=='2' else 0
print(cnt)

Solution (Python):
s = input()
counter = 0
for i in s:
    if(i == '2'):
        counter += 1
print(counter)

Solution (Python):
from collections import Counter
N = str(input())
print(N.count('2'))

Solution (Python):
N = input()

count = N.count('2')

print(count)

Solution (Python):
text = input()
cnt = 0
for i in text:
	if i == "2":
		cnt += 1
print (cnt)

Solution (Python):
li = list(input())
sum = 0
for i in range(len(li)):
    if li[i] == "2":
        sum += 1
print(sum)

Solution (Python):
a = input()
print(str(a).count("2"))

Solution (Python):
def read():
    buf = input()
    return buf


def solve(N):
    count = 0
    for letter in N:
        if letter is '2':
            count += 1

    return count


if __name__ == '__main__':
    inputs = read()
    print(solve(inputs))

Solution (Python):
N = input()
print(N.count("2"))

Solution (Python):
n = input()
n1 = len(n)
count = 0
for i in range(n1):
    if n[i] == '2':
        count += 1
print(count)

Solution (Python):
N = input()
cnt = 0
for i in range(4):
    if int(N[i]) == 2:
        cnt += 1

print(cnt)

Solution (Python):
bobo = input()
a=bobo.count('2')
print(a)

Solution (Python):
N = input()
count = 0
for n in N:
    if n == "2":
        count += 1
print(count)

Solution (Python):
N = str(input())

count = 0

for i in N:
    if i == '2':
        count += 1

print(count)

Solution (Python):
i = list(input())
s = 0
k = 0

while k <= 3:
    if i[k] == "2":
        s += 1
    k += 1
print (s)

Solution (Python):
s=int(input())
c=0
if s - int(s/10)*10 ==2:
    c=c+1
s=int(int(s/10))
if s - int(s/10)*10 ==2:
    c=c+1
s=int(int(s/10))
if s - int(s/10)*10 ==2:
    c=c+1
s=int(int(s/10))
if s - int(s/10)*10 ==2:
    c=c+1
s=int(int(s/10))

print(c)

Solution (Python):

import sys
import math
import numpy as np
import itertools

n = int(input())
answer = 0
while n>0:
    if n%10==2:
        answer += 1
    n = n // 10
print(answer)

Solution (Python):
print(input().count("2"))

Solution (Python):
n=int(input())
s=str(n)
c=0
for i in s:
	if i=='2':
		c+=1
print(c)

Solution (Python):
a=str(input())
b=0
for i in range(4):
  if(a[i]=="2"):
    b+=1
print(b)

Solution (Python):


s = input()
res = 0

for i in s:
	if i =='2':
		res +=1
		
print(res)

Solution (Python):
N = input()
print(N.count("2"))

Solution (Python):

t = list(input())
b = [int(s) for s in t]
print(b.count(2))

Solution (Python):
s = str(input())
count = 0
for i in s:
    if i == str(2):
        count = count + 1
print(count)

Solution (Python):
N = input()
print(N.count("2"))

Solution (Python):
N=input()

seek=0

for i in range(4):
    a=int(N[i:i+1])
    if a==2:
        seek+=1

print(seek)

Solution (Python):
N = input()

count = 0

for s in N:
    if s == '2':
        count += 1

print(count)

Solution (Python):
N = input().strip()
num=0

for i in range(len(N)):
    if N[i] == '2':
        num += 1
        
print(num)

Solution (Python):
N=str(input())
print(N.count("2"))

Solution (Python):
n = input()
count = 0
for i in range(4):
    if n[i] == "2":
        count += 1
print(count)

Solution (Python):
N=int(input())
lst = []
while N > 0:
    lst.append(N%10)
    N //= 10 
lst.reverse()
print(lst.count(2))

Solution (Python):
n=int(input())
ans=0
if n%10==2:
    ans+=1
if ((n-n%10)/10)%10==2:
    ans+=1
if ((n-n%100)/100)%10==2:
    ans+=1
if (n-n%1000)/1000==2:
    ans+=1
print(ans)

Solution (Python):
N = int(input())

cnt = 0

N4 = int(N /1000)

N = N - N4 * 1000

N3 = int(N /100)


N = N - N3 * 100

N2 = int(N /10)

N = N - N2 * 10
     

if N == 2:
    cnt =cnt + 1

if N4 == 2:
    cnt =cnt + 1

if N3 == 2:
    cnt =cnt + 1

if N2 == 2:
    cnt =cnt + 1

print(cnt)

Solution (Python):
N = int(input())

def digitSum(s):
    count = 0
    x1 = s//10**4
    x2 = (s-x1*10**4)//10**3
    x3 = (s-x2*10**3-x1*10**4)//10**2
    x4 = (s-x3*10**2-x2*10**3-x1*10**4)//10
    x5 = (s-x4*10-x3*10**2-x2*10**3-x1*10**4)

    if x2==2:
        count+=1
    if x3==2:
        count+=1
    if x4==2:
        count+=1
    if x5==2:
        count+=1

    return count
    


print(digitSum(N))

Solution (Python):
print(input().count('2'))

Solution (Python):
print(input().count('2'))

Solution (Python):
n = int(input())
n1000 = n//1000
na = n-1000*n1000
n100 = na//100
nb=na-100*n100
n10=nb//10
nc=nb-10*n10
c = 0
if n1000 ==2:
    c += 1
if n100 ==2:
    c += 1
if n10 ==2:
    c+=1
if nc ==2:
    c+=1
print(c)

Solution (Python):
n =list(str(input())) 
count = 0
for s in n:
  if s == '2':
    count+=1
print(count)

Solution (Python):
number_str = input()
count = 0
for c in number_str:
    if c == '2':
        count += 1

print(count)

Solution (Python):
a=list((input()))
count=0
for i in range(len(a)):
    if int(a[i])==2:
        count+=1
print(count)

Solution (Python):
n = input()
print(n.count('2'))

Solution (Python):
print(input().count('2'))

Solution (Python):
n = input()
print(n.count("2"))

Solution (Python):
n = input()
print(n.count('2'))

Solution (Python):
N = raw_input()
print len([i for i in N if i == '2'])

Solution (Python):
N = map(str,input())
M = [M for M in N]
print(M.count("2"))

Solution (Python):
number_str = input()
count = 0
for c in number_str:
    if c == '2':
        count += 1

print(count)

Solution (Python):
n=list(input())
c=0
for i in n:
  if i=='2':
    c+=1
print(c)

Solution (Python):
data = input()

print(data.count('2'))

Solution (Python):
num = input()

print(num.count("2"))

Solution (Python):

N = input()


print(N.count("2"))

Solution (Python):
print(input().count("2"))

Solution (Python):
N = str(input())


print(N.count("2"))

Solution (Python):


N = str(input())

count = 0
for i in N:
    if i == '2':
        count += 1

print(count)

Solution (Python):
n=input()
ans=0
ans=n.count('2')
print(ans)

Solution (Python):
N = str(input())

num = 0
ln = len(N)
for nn in range(ln):
    if N[nn] == "2":
        num = num + 1
print(num)

Solution (Python):
N = str(input())
cnt = 0
for c in N:
    if c=='2':
        cnt += 1
print(cnt)

Solution (Python):


from sys import stdin

def load():
    n = stdin.readline()
    return n

def calc(n):
    return n.count("2")

n = load()
print(calc(n))

Solution (Python):
n = input()
c = 0
for i in range(len(n)):
    if n[i] == '2':
        c += 1
print(c)

Solution (Python):
s = input()
count = 0

for c in s:
    if c == '2':
        count += 1
print(count)

Solution (Python):
a = int(input())
b = str(a)
print(b.count("2"))

Solution (Python):
N = input()
a = 0
for i in N:
    if i == "2":
        a += 1
print(a)

Solution (Python):
n = list(str(input()))

ans = 0

for i in range(len(n)):
    if n[i] == '2':
        ans += 1
print(ans)

Solution (Python):
N = input()
n = list(N)
cnt = 0
for s in n:
    if s == "2":
        cnt += 1
print(cnt)

Solution (Python):
n = list(input())
ret = 0
for c in n:
    if c == '2':
        ret += 1
print(ret)

Solution (Python):


n = list(input())

count = 0
for i in range(4):
    if n[i] == "2":
        count += 1


print(count)

Solution (Python):
N = input()
cnt = 0
for n in N:
    if n == '2':
        cnt += 1
print(cnt)

Solution (Python):
N = input()
ans_list = [x for x in N if x == '2']
print(len(ans_list))

Solution (Python):
S = input()
n = 0
for i in S:
    if i == '2':
        n += 1
print(n)

Solution (Python):
a = input()
print(a.count('2'))

Solution (Python):


N = int(input())

n_1000 = N // 1000
n_100 = (N - n_1000*1000) // 100
n_10 = (N - n_1000*1000 - n_100*100) // 10
n_1 = (N - n_1000*1000 - n_100*100 - n_10*10)

cnt = 0
if n_1000 == 2:
    cnt += 1
if n_100 == 2:
    cnt += 1
if n_10 == 2:
    cnt += 1
if n_1 == 2:
    cnt += 1

print(cnt)

Solution (Python):
N=input()

print(N.count('2'))

Solution (Python):
n=input()
count=0

for k in n:
    if k== "2":
        count+=1

print(count)

Solution (Python):
n = list(input())
print(n.count('2'))

Solution (Python):
n = str(input())
print(n.count("2"))

Solution (Python):
n = input()
print(n.count('2'))

Solution (Python):
N = input()
count = 0
for i in range(len(N)):
    if N[i] == '2':
        count += 1
print(count)

Solution (Python):
N = input()

cnt = 0
for n in N:
    if n == "2":
        cnt += 1

print(cnt)

Solution (Python):
print(input().count('2'))

Solution (Python):
N = input()
ans = 0
for d in N:
    if d == '2':
        ans += 1
print(ans)

Solution (Python):
print(str(input()).count('2'))

Solution (Python):
s = input()

ans = 0

for i in range(len(s)):
    if s[i] == '2':
        ans += 1

print(ans)

Solution (Python):
n = input()
print(n.count("2"))

Solution (Python):
n=input()

ans=0
for i in range(len(n)):
  if n[i]=="2":
    ans+=1
print(ans)

Solution (Python):
cs = list(input())
ans = len(list(filter(lambda c: c == '2', cs)))
print(ans)

Solution (Python):
N = input()
cnt = 0
for i in range(4):
    tmp = N[i]
    if tmp == "2":
        cnt += 1
print(cnt)

Solution (Python):
N = input()
ans = 0
for i in N:
    if i == '2':
        ans += 1
print(ans)

Solution (Python):
a=input()
count=0
for i in a:
    if i=='2':
       count+=1
print(count)

Solution (Python):
n = input()

print(n.count('2'))

Solution (Python):
N = str(input())

ans = 0
for i in range(0, 4):
    if N[i] == '2':
        ans = ans + 1
        
print(ans)

Solution (Python):
print(input().count("2"))

Solution (Python):
N = input()
print(N.count('2'))

Solution (Python):
n = str(input())
c = 0
for i in range(4):
 if n[i] == "2":
  c += 1
print(c)

Solution (Python):
N = input()
Sum = 0

for Str in N:
	
	if(Str == "2"):
		Sum += 1

print(Sum)

Solution (Python):

i = list(input())

n = 0
for x in i:
	if x == '2':
		n += 1

print(n)

Solution (Python):
n = input()
cnt = 0
for c in n:
    if c == '2':
        cnt += 1
print(cnt)

Solution (Python):
n=list(input())
a=0
for i in n:
    if i=='2':
        a+=1
print(a)

Solution (Python):
print(len([None for i in input() if i=='2']))

Solution (Python):
N  = input()
print(N.count('2'))

Solution (Python):
n = int(input())

count = 0
while n > 0 :
    if n % 10 == 2:
        count+=1
    n = n // 10

print(count)

Solution (Python):
N = str(input())
n = 0
for i in range(len(N)):
  if N[i] == "2":
    n += 1

print(n)

Solution (Python):
print(input().count("2"))

Solution (Python):
print(len([c for c in input() if c =='2']))

Solution (Python):
N = input();

print(N.count('2'))

Solution (Python):
n = input()





print(n.count("2"))

Solution (Python):
N = input()
print(N.count('2'))

Solution (Python):
N = input()
Nlis = list(N)
a = 0
for i in range(4):
    if int(Nlis[i])==2:
        a = a+1
print(a)

Solution (Python):
n=input()
cnt=0
for i in range(4):
  if n[i]=="2":
    cnt+=1
print(cnt)

Solution (Python):
N=list((input()))
ans=0
for i in range(len(N)):
    if N[i]=='2':
        ans+=1
print(ans)

Solution (Python):
N = input()
ans = 0
for i in range(4):
	if N[i] == '2':
		ans += 1
print(ans)

Solution (Python):
N = input()

print(N.count("2"))

Solution (Python):

"""
Created on Sat Dec 15 22:14:32 2018

@author: doppe
"""
a = input()

count = 0
for c in a:
    if c == '2':
        count += 1

print(count)

Solution (Python):
print(input().count("2"))

Solution (Python):
print(input().count('2'))

Solution (Python):

N = input()
print(N.count('2'))

Solution (Python):

x = (input())
cnt = 0
for c in x:
    if c == "2":
        cnt += 1

print(cnt)

Solution (Python):
n = input()
print(n.count("2"))

Solution (Python):
n = input()

count = 0
for i in n:
    if i == '2':
        count += 1
        
print(count)

Solution (Python):
N=input()

sum=0
for i in range(4):
    sum+=1 if N[i]=='2' else 0

print(sum)

Solution (Python):

import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline


def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N] = [(input_raw[0])]
    count = 0
    for s in N:
        if s == "2":
            count += 1

    print count

if __name__ == '__main__':
    main()

Solution (Python):
N=input()
ans=0
for i in N:
	if i == "2":
		ans+=1
print(ans)

Solution (Python):
n = list(input())
print(n.count("2"))

Solution (Python):
n=input()
a=0
for i in range(len(n)):
    if n[i]=='2':
        a=a+1
print(a)

Solution (Python):
N = input()
print(N.count('2'))

Solution (Python):

S = list(input())
print(S.count("2"))

Solution (Python):
N = int(input())

ans = 0

while N>0:
    tmp = N%10
    N = (N-tmp)//10
    if tmp == 2:
        ans = ans+1
        

print(ans)

Solution (Python):
n=(input())
cnt=0
for i in range(4):
    if n[i]=='2':
        cnt+=1
print(cnt)

Solution (Python):
N = input().strip().split()

Nstr = str(N)

count = 0
for i in range(0, len(Nstr)):
    if Nstr[i] == '2':
        count = count+1
print(count)

Solution (Python):
n=input()
print(n.count("2"))

Solution (Python):
N = input()
ans = 0

for i in N:
    if i == "2":
        ans += 1

print(ans)

Solution (Python):
n=input()
l=len(n)
sum=0
for i in range(l):
  if n[i]=='2':
    sum+=1
print(sum)

Solution (Python):




n = input()


cnt = 0


for idx in range(4):
    if int(n[idx]) == 2:
        cnt += 1
        

print(cnt)

Solution (Python):
N = input()
print(N.count('2'))

Solution (Python):
S = input()
print(sum([ int(s=='2') for s in S]))

Solution (Python):
from sys import stdin

def main():
    N = input()
    print(N.count('2'))

input = lambda: stdin.readline()
main()

Solution (Python):
n = (input())
print(n.count('2'))

Solution (Python):
N = input()

ans = 0
for n in N:
    if n == '2':
        ans += 1

print(ans)

Solution (Python):
n=input()
print(n.count("2"))

Solution (Python):
n=input()
c=0
for i in range(4):
  if n[i]=="2":c+=1
print(c)

Solution (Python):
N = input()
counter = 0
for i in N:
    if i == '2':
        counter += 1
print(counter)

Solution (Python):
s = input()
print(s.count('2'))

Solution (Python):
S = str(input())
count =0
for i in range(4):
    if S[i] == "2":
        count += 1
print(count)

Solution (Python):
N = input().strip()

print(N.count("2"))

Solution (Python):

a = input()

result = 0

for i in a:
    if i == '2':
        result += 1

print(result)

Solution (Python):
n = str(input())

print(n.count('2'))

Solution (Python):
N = input()
print(N.count('2'))

Solution (Python):
n=input()
print(n.count('2'))

Solution (Python):
n = list(input())
print(n.count('2'))

Solution (Python):
N=input()
count=0
for i in N:
    if i == "2":
        count+=1
print(count)

Solution (Python):
print(input().count('2'))

Solution (Python):
n = list(input())
c = 0
for i in n:
    if i == "2":
        c += 1
print(c)

Solution (Python):
n = input()
cnt = 0
for i in range(len(n)):
    if n[i] == '2':
        cnt = cnt+1
print(cnt)

Solution (Python):
N = str(input())

print(N.count('2'))

Solution (Python):
n = input()
print(n.count('2'))

Solution (Python):
import sys

input = sys.stdin.readline
n = input()
print(n.count('2'))

Solution (Python):
n = input()
ans = 0

for v in n:
    if v == '2':
        ans += 1

print(ans)

Solution (Python):
from sys import stdin
N=(stdin.readline().rstrip())
print(N.count("2"))

Solution (Python):



def main():
    """Function."""
    n = str(input())

    count = 0
    for i in range(len(n)):
        if n[i] == "2":
            count += 1
    print(count)


if __name__ == "__main__":
    main()

Solution (Python):
n = input()
print(n.count('2'))

Solution (Python):
N = input()
count = 0
for i in range(len(N)):
    if N[i] == '2':
        count += 1
print(count)

Solution (Python):
n=input()
print(n.count('2'))

Solution (Python):
n = input()
ans = 0
for i in n:
    if i == '2':
        ans += 1
print(ans)

Solution (Python):
N=int(input())
c=0
while N>0:
    if N%10==2:
        c+=1
    N//=10
print(c)

Solution (Python):
s = input()
print(s.count("2"))

Solution (Python):
n = input()

print(n.count('2'))

Solution (Python):
s=input()

count=0
for x in range(4):
	if(int(s[x])==2):
		count+=1

print(count)

Solution (Python):


N = input()

print(N.count('2'))

Solution (Python):
s = input()

cnt=0
for c in s:
    if c =="2":
        cnt+=1
print(cnt)

Solution (Python):
N=input()
ANS=N.count("2")
print(ANS)

Solution (Python):
N = list(input())
print(N.count("2"))

Solution (Python):
N = input()
count = 0

for n in N:
    if n == "2":
        count += 1
        
print(count)

Solution (Python):
x = raw_input().strip()
ans = 0
for c in x:
	if c == '2':
		ans+= 1
print ans

Solution (Python):
n=input()
ans=0
for i in range(4):
    if n[i]=="2":
        ans+=1

print(ans)

Solution (Python):
N = list(str(input()))

ans = 0 
for i in N:
    if i == '2':
        ans += 1
print(ans)

Solution (Python):
print(input().count("2"))

Solution (Python):
N=input()

count=0
for i in range(len(N)):
  if N[i]=='2':
    count+=1
    
print(count)

Solution (Python):
print(input().count('2'))

Solution (Python):
N = input()

ans = N.count("2")

print(ans)

Solution (Python):
a = str(input())
a = list(a)
b = a.count("2")
print(b)

Solution (Python):
print(raw_input().count('2'))

Solution (Python):
N = input()
count = 0
for i in range(len(N)):
    if N[i] == '2':
        count+=1
print(count)

Solution (Python):
s = input()
print(s.count('2'))

Solution (Python):
n=input().count('2')
print(n)

Solution (Python):
n = input()
c = 0
for i in range(len(n)):
    w = n[i]
    if w == "2":
        c += 1
print(c)

Solution (Python):
N = input()
ans = 0
for i in range(4):
	if N[i] == '2':
		ans = ans + 1
print(ans)

Solution (Python):
N = input()
res = 0
for i in range(len(N)):
    if N[i] == '2':
        res += 1
print(res)

Solution (Python):
n=input()
print(n.count('2'))

Solution (Python):

n = input()
print(n.count("2"))

Solution (Python):
n=input()
print(n.count("2"))

Solution (Python):
N = list(input())

print(N.count("2"))

Solution (Python):



 
import sys
import math



 

fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile


mod=1000000007
 

def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 

t=1
for tt in range(t):
	n=str(input())
	print(n.count('2'))
    
    
    
    

if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

Solution (Python):
N = input()

r = N.count("2")

print(r)

Solution (Python):
a = input()

c = 0
for i in a:
    if i=="2":
        c += 1
print(c)

Solution (Python):
N=input()

print(N.count("2"))

Solution (Python):
n=input()
print(n.count("2"))

Solution (Python):
s = input()
ans = 0

for i in s:
    if i == '2':
        ans += 1

print(ans)

Solution (Python):
s = raw_input()
cnt = 0
for a in s:
	if a == '2':
		cnt += 1
print cnt

Solution (Python):
a=input()
ans=0
for x in a:
    if x=='2':
        ans +=1
print(ans)

Solution (Python):
N = input()
ans = N.count("2")
print(ans)

Solution (Python):
N = input()
print(N.count('2'))

Solution (Python):
print(input().count('2'))

Solution (Python):
n = input()
n = list(n)
print(n.count('2'))

Solution (Python):


import sys
from collections import Counter


input = sys.stdin.readline
INF = float('inf')
MOD = 10 ** 9 + 7


def inpl(): return list(map(int, input().split()))


N = int(input())

ans = 0
for s in str(N):
    if s == '2':
        ans += 1

print(ans)

Solution (Python):

S = input()
print(S.count('2'))

Solution (Python):
A = input()
print(A.count("2"))

Solution (Python):
N = input()
print(N.count('2'))

Solution (Python):
print(input().count("2"))

Solution (Python):
n = input()
print(n.count("2"))

Solution (Python):
N = input()
print(N.count("2"))

Solution (Python):
N = input()
print(N.count('2'))

Solution (Python):
N=input()
count=0
for i in N:
    if(i=='2'):
       count+=1
print(count)

Solution (Python):
s=list(input())
print(s.count("2"))

Solution (Python):
a = list(input())

k = 0

for i in range(len(a)):
	if a[i] == '2':
		k += 1

print(k)

Solution (Python):
N = input()
print(N.count("2"))

Solution (Python):
n = input()

counter = 0
for i in n:
  if i == '2':
      counter += 1
print(counter)

Solution (Python):
n = int(input())
print(str(n).count("2"))

Solution (Python):
s = input()
print(s.count('2'))

Solution (Python):
s = input()
ret = 0
for c in s:
  if c == '2':
    ret += 1
print(ret)

Solution (Python):
n =input()
print(n.count("2"))

Solution (Python):
N = input()
c = 0
for n in N:
    if n=="2":
        c+=1
print(c)

Solution (Python):



def main():
    n = input()
    print(n.count('2'))


if __name__ == '__main__':
    main()

Solution (Python):
n = input()
print(n.count("2"))

Solution (Python):
s = input()
print(s.count('2'))

Solution (Python):
n = input()
print(n.count("2"))

Solution (Python):
s = input()
print(s.count('2'))

Solution (Python):
N = input()
res = 0
for i in N:
    if i == "2":
        res += 1

print(res)

Solution (Python):
n = input()
print(n.count('2'))

Solution (Python):
n = input()
print(n.count('2'))

Solution (Python):
print(input().count('2'))

Solution (Python):
n = list(input())

print(n.count('2'))

Solution (Python):
print(input().count('2'))

Solution (Python):
from statistics import mean, median,variance,stdev
import sys
import math
import fractions
def j(a):
    if a: print("AC")
    else :print("WA")


def ct(x,y):
    if (x>y):print("")
    elif (x<y): print("")
    else: print("")

def ip():
    return int(input())






a = input()                                  




print(a.count("2"))

Solution (Python):
print(input().count('2'))

Solution (Python):
N = input()
print(N.count('2'))

Solution (Python):
n = input()

print(n.count("2"))

Solution (Python):
s = input()
print(s.count("2"))

Solution (Python):
def caddi2018b_a():
    n = input()
    print(n.count("2"))


caddi2018b_a()

Solution (Python):
n = input()
print(n.count("2"))

Solution (Python):
N = input().strip()
print(N.count('2'))

Solution (Python):
print(input().count("2"))

Solution (Python):
n = input()
print(n.count('2'))