/* ʕ•̀ ω • ʔ *˘︶˘*).。.:*♡ (∗ᵒ̶̶̷̀ω˂̶́∗)੭₎₎̊₊♡ (⋈◍>◡<◍) ʕ•̫͡• ʔ•̫͡•ཻʕ•̫͡•ʔ•͓͡•ʔ.•♫•♬ •♬•♫•.✿.。.:* ☆ .:**:.☆*.:。.✿ *★°*:.☆:*.°★*
●▂● ●0● ●︿● ●ω● ●﹏● ●△● ●▽● ♡⃝ ʜᴇʟʟᴏ •ᴗ• ☽⋆
∩ ∩ ̋(๑˃́ꇴ˂̀๑) ᐕ)⁾⁾ *:ஐ (๑´ᵕ`) ஐ:* *ଘ(੭*ˊᵕˋ)੭* (੭ˊᵕˋ)੭* ੈ✩˚
>(>_<)<
I I
I I ʕง•ᴥ•ʔง
IU UI
I I ꉂꉂ꒰•̤▿•̤*ૢ꒱
≧▂≦ ≧0≦ ≧︿≦ ≧ω≦ ≧﹏≦ ≧△≦ ꒰๑˃͈꒵˂͈๑꒱
☗♪叮☖叮♫ ☗铛♪ ☖♫☗♪叮☖叮♫ ☗铛♪ ☖♫☗♪叮☖叮♫ ☗铛♪ ☖♫☗♪叮☖叮♫ ☗铛♪ ☖♫
(~o▔▽▔)~o o~(▔▽▔o~) ‿︵‿︵‿︵୨˚̣̣̣͙୧ - - - -୨˚̣̣̣͙୧‿︵‿︵‿︵
*/#include<bits/stdc++.h>
using namespace std;#definelll__int128#defineendl'\n'typedeflonglong ll;typedefunsignedlonglong ull;typedef pair<ll,ll> PII;constint mod=1e9+7;inline ll read(){
ll x =0, y =1;char c =getchar();while(!isdigit(c)){if(c =='-')
y =-1;
c =getchar();}while(isdigit(c)){
x =(x <<3)+(x <<1)+(c ^48);
c =getchar();}return x *= y;}inlinevoidwrite(ll x){if(x <0)
x =-x,putchar('-');
ll sta[35], top =0;do
sta[top++]= x %10, x /=10;while(x);while(top)putchar(sta[--top]+'0');}voidMiraitowa(){int n;
string s;int x, y, z;
cin >> n >> s >> x >> y >> z;int k =0;for(int i =0; i < s.size();i++)if(s[i]=='0')break;else k++;int cnt =0, res =0;for(int i = k; i < s.size();i++)if(s[i]=='0') cnt++;else{if(cnt&&y) res++, cnt--, y--;}
cout << res << endl;}intmain(){// ios::sync_with_stdio(false);// cin.tie(0),cout.tie(0);// int t;// cin>>t;// while(t--)Miraitowa();return0;};