#pragma GCC optimize "trapv"
#include<iostream>
#include <bits/stdc++.h>
using namespace std;
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ll long long
#define ull unsigned long long
#define ui unsigned int
#define vi vector<int>
#define vll vector<ll>
#define pb push_back
#define ld long double
#define mp make_pair
#define pii pair<int,int>
#define mod 1000000007
#define rep(i,n) for(int i=0;i<n;i++)
#define repp(i,a,n) for(int i=a;i<n;i++)
#define all(v) v.begin(),v.end()
#define input(arr,n) for(ll i1=0;i1<n;i1++ )cin>>arr[i1]
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
#define ordered_set tree<ll, null_type,less_equal<ll>, rb_tree_tag,tree_order_statistics_node_update>//s.order_of_key(val) *s.find_by_order(ind)
int main()
{
    fio;
    int t=1;
    //cin>>t;
    while(t--)
    {
        ll n,x;
        cin>>n>>x;
        string s;
        cin>>s;
        for(char c:s)
        {
            if(c=='x' && x>0)
            x--;
            else if(c=='o')
            x++;
        }
        cout<<x<<endl;
    }
}
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx,avx2,sse,sse2,sse3,sse4")

#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
typedef long long ll;
const ll INF=1e18+7;
const int MAXN=1e6+7;

//struct EDGE {int n,next;} edge[MAXN<<1];
int n,x;
string s;
signed main()
{
	ios_base::sync_with_stdio(false),cin.tie(0);
	cin>>n>>x>>s;
	for(int i=0;i<s.size();i++)
	{
		if(s[i]=='x')
		{
			if(x>0) x--;
		}
		else x++;
	}
	cout<<x<<endl;
	return 0;
}