#include #include #include #include #include #include #include #include #include #include #define mkp make_pair #define mkt make_tuple #define rep(i,n) for(int i = 0; i < (n); ++i) using namespace std; typedef long long ll; const ll MOD=1e9+7; int main(){ int N; cin>>N; string S; cin>>S; int ans=0; string T=""; for(int i=0;i=0;i--){ if(T[i]=='9') nine++; else{ if(nine>0){ nine--; ans++; }else one++; } } int p=0; for(int i=0;i=2) ans++; cout<