#include using namespace std; typedef long long ll; bool isprime(long long int val) { if (val <= 1)return false; for (long long int i = 2; i*i <= val; i++) { if (val%i == 0LL)return false; } return true; } signed main(){ ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(20); int n; string s; cin>>n>>s; ll ans = 0; string num = "13579"; ll cnt[5]={}; for(int i=0;i=2){ q-=2; ans++; } else t++; } if(s[i]=='9' && t){ ans++; t--; } else if(s[i]=='9'){ q++; } } ans += t/2; cout << ans << endl; }