# include <stdio.h>
# define max(a, b) (a>b?a:b)

using namespace std;

int n, x;
char s[200200];

int main() {
  scanf("%d%d%s", &n, &x, s);
  for (int i = 0; i < n; i++) {
    if (s[i] == 'x') {
      x = max(0, x - 1);
    } else {
      x++;
    }
  }
  printf("%d", x);
}
#include<bits/stdc++.h>
// #include<iomanip>
// #pragma GCC optimize("Ofast")
#define eb  emplace_back
#define pb  push_back
#define top 200007
#define min(a,b) (a<b) ? a:b
#define max(a,b) (a>b) ? a:b;
#define F first
#define S second
using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);  cout.tie(0);
    int n, k;
    cin>>n>>k;
    int sum =0;
    for(int i=1;i<=n; ++i)
        for(int j=1; j<=k; ++j)
        {
            sum +=(i*100+j);
        }

    cout<<sum<<endl;


    return 0;
}