#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=(1<<19);
typedef long long LL;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
LL dp[maxn];
LL ma[20][20];
LL s[maxn];///标记该集合状态是否是完全图
LL b[maxn];///标记每个点的连通点图状态
int main(void){
   cin.tie(0);std::ios::sync_with_stdio(false);
   LL n,m;cin>>n>>m;
   for(LL i=1;i<=m;i++){
      LL u,v;cin>>u>>v;
      ma[u][v]=ma[v][u]=1;
   }
   for(LL i=1;i<=n;i++) b[i]=1<<(i-1);
   for(LL i=1;i<=n;i++){
      for(LL k=1;k<=n;k++){
          if(ma[i][k]) b[i]|=1<<(k-1);
      }
   }

   for(LL x=0;x<(1<<n);x++){
       bool flag=1;
       for(LL i=1;i<=n;i++){
           if(x&(1<<(i-1))){
               if(! ( (x|b[i])==b[i]) ){
                  flag=0;
                  break;
               }
           }
       }
       if(flag) s[x]=1;
   }
   memset(dp,0x3f,sizeof(dp));
   dp[0]=0;
   for(LL x=0;x<(1<<n);x++){
       for(LL i=x;i;i=(i-1)&x){
           if(s[i]) dp[x]=min(dp[x],dp[x^i]+1);
       }
   }
   cout<<dp[(1<<n)-1]<<"\n";
   return 0;
}

#pragma GCC target ("avx2")
#pragma GCC optimize ("unroll-loops")
#pragma GCC optimize ("O3")
#include "bits/stdc++.h"
#include <unordered_set>
#include <unordered_map>
#include <random>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
constexpr ll MOD = 1'000'000'007LL; /*998'244'353LL;*/
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for(int (i)=0; (i)<(n); (i)++)
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; }
constexpr int dy[4]={-1,0,1,0};
constexpr int dx[4]={0,-1,0,1};

int N, M;
int A[1000], B[1000];
bool con[18][18];

int dp[1<<18];
int solve(int s){
    if(dp[s] != -1) return dp[s];
    bool ok = true;
    rep(i, N){
        for(int j=i+1; j<N; j++){
            if(((s>>i)&1) & ((s>>j)&1)){
                ok &= con[i][j];
            }
        }
    }
    if(ok) return dp[s] = 1;
    int ret = 100;
    for(int i=(s-1)&s; i>0; i=(i-1)&s){
        chmin(ret, solve(i) + solve(i^s));
    }
    return dp[s] = ret;
}

signed main(){
    cin >> N >> M;
    rep(i, M){
        cin >> A[i] >> B[i];
        A[i]--; B[i]--;
        con[A[i]][B[i]] = true;
        con[B[i]][A[i]] = true;
    }
    memset(dp, -1, sizeof(dp));
    cout << solve((1<<N)-1) << endl;
}