#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> P;
typedef vector<ll> VI;
typedef vector<VI> VVI;
#define REP(i,n) for(int i=0;i<(n);i++)
#define ALL(v) v.begin(),v.end()
constexpr ll MOD=1000000007;
constexpr ll INF=1e18;

int main(){
    int n, m; cin >> n >> m;
    vector<vector<bool>> edge(n,vector<bool>(n,false));
    int a, b;
    REP(i,m){
        cin >> a >> b;
        a--, b--;
        edge[a][b]=true;
        edge[b][a]=true;
    }
    VI dp(1<<n,INF);
    REP(i,1<<n){
        VI v;
        int ii=i;
        REP(j,n){
            if(ii%2)
                v.push_back(j);
            ii=ii>>1;
        }
        int siz=v.size();
        int c=0;
        REP(j,siz)REP(k,j){
            c+=edge[v[j]][v[k]];
        }
        if(c==siz*(siz-1)/2)
            dp[i]=1;
    }
    int ans=n;
    REP(i,1<<n){
        for(int j=i;--j&=i;)
            dp[i]=min(dp[i],dp[i^j]+dp[j]);
    }
    cout << dp[(1<<n)-1] << endl;
    return 0;
}
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <numeric>
#include <string>
#include <cstdio>
#include <cstring>
#include <queue>
#include <stack>
#include <set>
#include <cmath>
#include <bitset>
#include <iomanip> 

using namespace std;

using ll = long long;
using ull = unsigned long long;

#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(int i = 0;(i) < ((int)(n));++(i))
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() )
#define test(a) cout<<"line:"<<__LINE__<<"["<<(#a)<<": "<<(a)<<"]"<<endl

constexpr int INF = 1e9+7;
constexpr ll INFL = 9*1e18;

constexpr int dx[4] = { 1, 0, -1, 0 };
constexpr int dy[4] = { 0, 1, 0, -1 };

// constexpr int dx[8] = {1, 1, 0,-1,-1,-1, 0, 1};
// constexpr int dy[8] = {0, 1, 1, 1, 0,-1,-1,-1};

int inline digit(ll num){int tmp = 0;while(num){tmp++;num/=10;}return tmp;} // 桁数
ull inline power(ull a,ull b){ull res = 1;rep(i,b)res *= a;return res;}
template<typename T>inline T SUM(vector<T> vec){return accumulate(all(vec),(T)0);} // vectorの中身を全部足す
template<typename T>inline T digitSum(T num){T sum = 0;while(num){sum+=num%10;num/=10;}return sum;} // 各桁の和
template<typename T>inline T gcd(T a,T b){if(b == 0)return a;return gcd(b,a%b);} // 最大公約数
template<typename T>inline T lcm(T a, T b){T g = gcd(a,b);return a/g*b;} // 最小公倍数
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<typename T>inline void print(T&& x){cout<<setprecision(32)<<x<<endl;}
string to_oct(int n){string s;while(n){s = to_string(n%8) + s;n /= 8;}return s;}

int main(){
  int n;cin>>n;
  string s;cin>>s;
  string t = "";
  int ans = 0;
  rep(i,n){
    t.push_back(s[i]);
    if(t.length() >= 3 && (t.substr(t.length()-3) == "fox")){
      t = t.substr(0,t.size()-3);
      ans++;
    }
  }
  print(n - ans*3);
  return 0;
}
