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
#include<bits/stdc++.h>

using namespace std;

int main()
{
	string s;
	cin>>s;
	int cnt = 0;
	for(int i=0;i<s.length();i++){
		if(s[i]=='2'){
			cnt++;
		}
	}
	cout<<cnt;
}
