#include<bits/stdc++.h>
using namespace std;
 
#define rep(i, j, n) for(int i = (j); i < (int)(n); i++)
#define print(t) cout << t << endl
 
 
using ll = long long;
using Graph = vector<vector<int>>;
 
#define SIZE(s) ll(s.size())
 
int main(){
  int N, X; cin >> N >> X;
  string S; cin >> S;
  rep(i, 0, N){
    if(S.at(i) == 'o'){X++; continue;}
    if(S.at(i) == 'x'){
      if(X == 0) continue;
      else X--;
    }
  }
  print(X);
}
#include <bits/stdc++.h>
using namespace std;

#define int long long

signed main() {
    vector<int> arr(3);
    cin >> arr[0] >> arr[1] >> arr[2];
    sort(arr.begin(), arr.end());
    if (arr[0] == arr[1]) {
        cout << arr[2];
    } else if (arr[1] == arr[2]) {
        cout << arr[0];
    } else {
        cout << 0;
    }
    return 0;
}