#include using namespace std; int main(){ int N; cin >> N; string s; cin >> s; int ans=0; int cnt1=0; int cnt9=0; for(int i=0;i0){ ans++; cnt1--; cnt9--; } } } } ans+=cnt1/2; cnt1%=2; ans+=min(cnt9/2,cnt1); cout << ans << endl; }