p03192 CADDi 2018 for Beginners - 12/22
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.

Examples

Input

1222


Output

3


Input

3456


Output

0


Input

9592


Output

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