#include using namespace std; int main(){ int n; string s;cin>>n>>s; int ans = 0; for(int i = 0; n > i; i++){ if(s[i] == '3' || s[i] == '5' || s[i] == '7')ans++; } string z; for(int i = 0; n > i; i++){ if(s[i] == '3' || s[i] == '5' || s[i] == '7')continue; z.push_back(s[i]); } for(int i = 0; z.size() > i; i++){ if(z[i] == '1'){ if(i+1!=z.size()){ ans++; i++; } } } cout << ans << endl; }