#include<bits/stdc++.h>
typedef long long     ll;
#define fast          ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define last          freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);
#define fr            first
#define sc            second
#define lcm(a,b)      (a*b)/__gcd(a,b)
#define com(i,n)      for(int i=0;i<n;i++)
#define dom(i,n)      for(int i=1;i<=n;i++)
#define mom(i,n)      for(int i=n;i>=0;i--)
#define sortI(a,n)    sort(a,a+n)
#define sortD(a,n)    sort(a,a+n,greater<int>())
#define sortvi(a)     sort(a.begin(),a.end())
#define sortvd(a)     sort(a.begin(),a.end(),greater<int>())
#define sumall(a,x)   accumulate(a.begin(),a.end(),x)
#define pi            3.14159265358979323846264338327950
#define endl          '\n'
using namespace std;
int main()
{
     ll n,x;
     string s;
     cin>>n>>x>>s;
     com(i,n)
     {
          if(s[i]=='x')
          {
               if(x>0)
                    x--;
          }
          else
               x++;
     }
     cout << x << endl;
}

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

