#include using namespace std; #define rep(i,n) for(int i=0,_i=(n);i<_i;++i) int main() { int N; string S; cin >> N >> S; int one = 0, ans = 0; rep(i, N) { if (S[i] == '3' || S[i] == '5' || S[i] == '7') ++ans; if (S[i] == '1') ++one; } cout << ans + one / 2 << endl; return 0; }