#include<iostream>
using namespace std;
int main(){
  int n,point,i;
  string str;
  cin>>n>>point>>str;
  for(i=0;i<n;i++){
    if(str[i]=='o') point++;
    else{
      if(point==0) continue;
      else point--;
      }
    }
  cout<<point<<endl;
  
  return 0;
  }
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define TEZ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define f(i,a,b) for(ll i=a;i<b;i++)
#define rf(i,a,b) for(ll i=a;i>=b;i--)
#define pb push_back
#define vi vector<pair<ll,ll>>
#define ff first
#define ss second
#define mp map<ll,ll>
#define test ll t; cin>>t; while(t--)
#define srt(v) sort(v.begin(),v.end())
double pi=acos(-1);
const ll MOD=1000000007;
int main(){
    TEZ;
    ll a,b,c;
    cin>>a>>b>>c;
    ll sum=21-(a+b+c);
    cout<<sum;
}