#include <bits/stdc++.h>
#define int long long
#define debug(x) cerr << #x << ": " << x << '\n'

using namespace std;
const long long INF = 1e18;
const long long MOD = 998244353;

void solve()
{
    int n, x;
    cin >> n >> x;
    string s;
    cin >> s;

    int now = x;
    for (int i = 0; i < n; i++)
    {
        if (s[i] == 'o')
            now += 1;
        else
            now = max((int)0, now - 1);
    }
    cout << now << endl;
}

signed main()
{
    solve();
    return 0;
}

#include <bits/stdc++.h>
#define rep(i,n) for (int i=0;i<(n);i++)
using namespace std;
using ll = long long;
int main(){
    int a,b;
    cin >> a >> b;
    int ans=2*a+100-b;
    cout<<ans<<endl;
    return 0;
}