/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author
 */

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
using s = string;
using P = pair<int, int>;
template<class T>bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }
const long long inf = 1LL << 60;

class BQuizzes {
public:
	void solve(std::istream& in, std::ostream& out) {
        ll n, x;
        s s;
        in >> n >> x >> s;
        for (int i = 0; i < n; ++i) {
            if(s[i] == 'x'){
                if(x > 0) x--;
            }else{
                x++;
            }
        }
        out << x;
	}
};


int main() {
	BQuizzes solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	solver.solve(in, out);
	return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int a,sum=0,dex=3;
    while(dex--)
    {
    cin >> a;
    if(a==1)
    {
        a=6;
    }
    else if(a==2)
    {
        a=5;
    }
    else if(a==3)
    {
        a=4;
    }
    else if(a==4)
    {
        a=3;
    }
    else if(a==5)
    {
        a=2;
    }
    else if(a==6)
    {
        a=1;
    }
    sum+=a;
    }
    cout << sum << endl;
    return 0;
}
