#include <bits/stdc++.h>

using namespace std;

int main(){
    int n,m;
    cin>>n>>m;
    vector<int> g(n);
    for(int i=0;i<m;i++){
        int a,b;
        cin>>a>>b;
        a--;b--;
        g[a]|=1<<b;
        g[b]|=1<<a;
    }
    if(m==0){
        cout<<n<<endl;
        return 0;
    }
    vector<int> dp(1<<n,n+1);
    dp[0]=1;
    for(int i=0;i<n;i++){
        for(int j=0;j<(1<<n);j++){
            if(dp[j]==1&&(g[i]&j)==j)dp[j|(1<<i)]=1;
        }
    }
    for(int i=0;i<(1<<n);i++){
        for(int j=i;--j&=i;){
            dp[i]=min(dp[i],dp[i^j]+dp[j]);
        }
    }
    cout<<dp.back()<<endl;
}
#include<bits/stdc++.h>
using namespace std;
#define ALL(x) begin(x),end(x)
#define rep(i,n) for(int i=0;i<(n);i++)
#define debug(v) cout<<#v<<":";for(auto x:v){cout<<x<<' ';}cout<<endl;
#define mod 1000000007
using ll=long long;
const int INF=1000000000;
const ll LINF=1001002003004005006ll;
int dx[]={1,0,-1,0},dy[]={0,1,0,-1};
// ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;}
template<class T>bool chmin(T &a,const T &b){if(b<a){a=b;return true;}return false;}

struct IOSetup{
    IOSetup(){
        cin.tie(0);
        ios::sync_with_stdio(0);
        cout<<fixed<<setprecision(12);
    }
} iosetup;
 
template<typename T>
ostream &operator<<(ostream &os,const vector<T>&v){
    for(int i=0;i<(int)v.size();i++) os<<v[i]<<(i+1==(int)v.size()?"":" ");
    return os;
}
template<typename T>
istream &operator>>(istream &is,vector<T>&v){
    for(T &x:v)is>>x;
    return is;
}


signed main(){
    int n,m;cin>>n>>m;
    vector<vector<int>> g(n,vector<int>(n,false));
    rep(i,m){
        int u,v;cin>>u>>v;u--,v--;
        g[u][v]=true;
        g[v][u]=true;
    }

    vector<int> dp(1<<n,INF);
    dp[0]=0;
    for(int bit=1;bit<(1<<n);bit++){
        bool f=true;
        for(int i=0;i<n and f;i++)if((bit>>i)&1){
            for(int j=i+1;j<n and f;j++)if((bit>>j)&1){
                if(!g[i][j])f=false;
            }
        }
        if(f){
            dp[bit]=1;
            // cout<<bit<<" "<<1<<endl;
        }
    }

    for(int bit=1;bit<(1<<n);bit++){
        //部分集合bitの部分集合subsetの列挙
        int subset=bit;
        do{
            //処理
            if(subset!=bit){
                chmin(dp[bit],dp[subset]+dp[bit^subset]);
            }
            //次の集合計算↓
            subset=(subset-1)&bit;
        }while(subset!=bit);//0の次，-1&bit=bitなので終わり
    }
    cout<<dp[(1<<n)-1]<<endl;
    return 0;
}
