#include <bits/stdc++.h>
using namespace std;
using ll = long long;
typedef pair<ll,ll> P;
#define FOR(i,a,b) for(ll i=(a);i<(b);++i)
#define EFOR(i,a,b) for(ll i=(a);i<=(b);++i)
#define REP(i, n) FOR(i,0,n)
#define INF 1000000000
ll nums = 10000000000;

int main() {
    int n; cin >> n;
    string s,t; cin >> s;
    REP(i,s.size()){
        t.push_back(s[i]);
        if(t.size() <= 2) continue;
        if(t.substr(t.size()-3,t.size()) == "fox"){
            t = t.substr(0,t.size()-3);
        }
    }
    cout << t.size() << endl;
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
const int mod = 1000000007;
int mpow(int b, int e);

int main(){
    IOS
    int n, m; cin>>n>>m; 
    vector<int> g(1<<n, 0), complete(1<<n, -1);
    for(int i=0; i<m; i++){
    	int a, b; cin>>a>>b; a--; b--;
    	g[1<<a] = g[1<<a] | (1<<b);
    	g[1<<b] = g[1<<b] | (1<<a);
    }

    for(int i=1; i<(1<<n); i++){
    	for(int j=0, t=i; t; t>>=1, j++){
    		if(i & (1<<j)){
    			int x = i^(1<<j), y = g[1<<j];
    			if((y & x) != x){
    				complete[i]=0;
    				break;
    			}
    		}
    	}
    	if(complete[i]==-1) 
    		complete[i]=1;
    }
    vector<int> dp(1<<n, INT_MAX);
    // dp[0]=1;
    for(int i=1; i<(1<<n); i++){
    	if(complete[i]==1)
    		dp[i]=1;
    	else{
    		for(int j=i-1; j; j = (j-1)&i)
    			dp[i] = min(dp[i], dp[j]+dp[i^j]);
    	}
    }
    // for(auto i: g) cout<<i<<" "; cout<<endl;
    // for(auto i: complete) cout<<i<<" ";
    // cout<<endl;
    cout<<dp[(1<<n)-1]<<endl;
    return 0;
}

//modular exponentiation
int mpow(int base, int exp) {
  base %= mod;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((ll)result * base) % mod;
    base = ((ll)base * base) % mod;
    exp >>= 1;
  }
  return result;
}