#include <bits/stdc++.h>
using namespace std;
int main() {
  int n,a,b;
  cin >> n >> a >> b;
  cout << n-a+b << endl;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
	ll n,x,i;
	string a;
	cin>>n>>x>>a;
	for(i=0;i<n;i++)
	{
		if(a[i]=='o')
			x++;
		if(a[i]=='x'  && x>0)
			x--;
	}
	cout<<x<<endl;
}