#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define rep(i,a) for(int i=(int)0;i<(int)a;++i) #define pb push_back #define eb emplace_back using ll=long long; constexpr ll mod = 1e9 + 7; constexpr ll INF = 1LL << 50; constexpr double pi=3.14159265358979; template inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } using namespace std; void solve(){ int n; string s; cin>>n>>s; bool judge1=true,judge9=true; int ans=0,one=0; rep(i,n){ if(!judge9&&s[i]=='1')judge1=true; if(s[i]=='9')judge9=true; if(s[i]=='3')++ans; if(s[i]=='5')++ans; if(s[i]=='7')++ans; if(s[i]=='1')++one; } ans+=one/2; if(one!=1&&one%2&&judge1)ans++; cout<