#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <map>
#include <queue>
#include <iomanip>
#include <set>
#include <tuple>
#define mkp make_pair
#define mkt make_tuple
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define all(v) v.begin(),v.end()
using namespace std;
typedef long long ll;
const ll MOD=1e9+7;
template<class T> void chmin(T &a,const T &b){if(a>b) a=b;}
template<class T> void chmax(T &a,const T &b){if(a<b) a=b;}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int N,M;
  cin>>N>>M;
  vector<int> A(M),B(M);
  rep(i,M) cin>>A[i]>>B[i];

  rep(i,M){
      A[i]--;B[i]--;
  }

  vector<vector<int>> direct(N,vector<int> (N,0));
  rep(i,M){
      direct[A[i]][B[i]]=1;
      direct[B[i]][A[i]]=1;
  }

  vector<int> complete((1<<N),0);
  for(int bit=0;bit<(1<<N);bit++){
      vector<int> v;
      rep(i,N) if(bit&(1<<i)) v.push_back(i);
      bool ng=false;
      for(int i=0;i<v.size();i++) for(int j=i+1;j<v.size();j++){
          if(direct[v[i]][v[j]]==0){
              ng=true;
              break;
          }
      }
      if(ng==false) complete[bit]=1;
  }

  vector<int> dp((1<<N),-1);
  auto dfs =[&](auto &&dfs,int state)->int{
      if(dp[state]!=-1) return dp[state];
      if(state==0) return 0;

      int res=MOD;
      for(int T=state;;T=(T-1)&state){
          if(T==0) break;
          if(complete[T]==0) continue;
          chmin(res,dfs(dfs,state^T));
      }
      return dp[state]=res+1;
  };

  int ans=dfs(dfs,(1<<N)-1);
  cout<<ans<<endl;

  return 0;
}

#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
//     using namespace __gnu_pbds;
using namespace std;
#define ll long long
#define ull unsigned long long
#define ld long double
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vll vector<ll>
#define vc vector<char>
#define vs vector<string>
#define vpll vector<pll>
#define vpii vector<pii>
#define umap unordered_map
#define uset unordered_set
#define PQ priority_queue
#define printa(a, L, R)         \
    for (int i = L; i < R; i++) \
    cout << a[i] << (i == R - 1 ? '\n' : ' ')
#define printv(a) printa(a, 0, a.size())
#define print2d(a, r, c)            \
    for (int i = 0; i < r; i++)     \
        for (int j = 0; j < c; j++) \
    cout << a[i][j] << (j == c - 1 ? '\n' : ' ')
#define pb push_back
#define eb emplace_back
#define UB upper_bound
#define LB lower_bound
#define F first
#define S second
#define mem(a, x) memset(a, x, sizeof(a))
#define inf 1e18
#define E 2.71828182845904523536
#define gamma 0.5772156649
#define nl "\n"
#define lg(r, n) (int)(log2(n) / log2(r))
#define rev(v) reverse(v.begin(), v.end())
#define srt(v) sort(v.begin(), v.end())
#define grtsrt(v) sort(v.begin(), v.end(), greater<ll>())
#define all(v) v.begin(), v.end()
#define mnv(v) *min_element(v.begin(), v.end())
#define mxv(v) *max_element(v.begin(), v.end())
#define toint(a) atoi(a.c_str())
#define BeatMeScanf ios_base::sync_with_stdio(false)
#define one(x) __builtin_popcount(x)
#define Unique(v) v.erase(unique(all(v)), v.end())
#define fout(x) fixed << setprecision(x)
#define debug(args...)                           \
    {                                            \
        string _s = #args;                       \
        replace(_s.begin(), _s.end(), ',', ' '); \
        stringstream _ss(_s);                    \
        istream_iterator<string> _it(_ss);       \
        deb(_it, args);                          \
    }
void deb(istream_iterator<string> it)
{
}
template <typename T, typename... Args>
void deb(istream_iterator<string> it, T a, Args... args)
{
    cout << *it << " = " << a << endl;
    deb(++it, args...);
}
const int mod = 1e9 + 7;
const int N = 100000;
const ld eps = 1e-9;
const ld PI = acos(-1.0);

// template <typename T>
// using o_set = tree<T, null_type, less<T>,
//                    rb_tree_tag, tree_order_statistics_node_update>;

//random_device rd;
//mt19937 random(rd());

ll gc(ll a, ll b)
{
    while (b)
    {
        ll x = a % b;
        a = b;
        b = x;
    }
    return a;
}
ll lc(ll a, ll b) { return a / gc(a, b) * b; }
ll qpow(ll n, ll k)
{
    ll ans = 1;
    assert(k >= 0);
    n %= mod;
    while (k > 0)
    {
        if (k & 1)
            ans = (ans * n) % mod;
        n = (n * n) % mod;
        k >>= 1;
    }
    return ans % mod;
}

ll g[20][20], n, m;
ll dp[1LL<<20];

void solve()
{
    cin>>n>>m;
    for(int i=1;i<=m;i++)
    {
        ll x, y;
        cin>>x>>y;
        x--, y--;
        g[x][y]=1;
        g[y][x]=1;
    }
    for(ll i=1;i<(1LL<<n);i++)
    {
        if(__builtin_popcount(i)==1)
        {
            dp[i]=1;
            continue;
        }
        vll v;
        for(ll j=0;j<n;j++)
        {
            if(i&(1LL<<j)) v.pb(j);
        }
        int f=0;
        for(int a=0;a<v.size();a++)
        {
            for(int b=a+1;b<v.size();b++)
            {
                if(g[v[a]][v[b]]==0) f=1;
                if(f) break;
            }
            if(f) break;
        }
        if(f) continue;
        dp[i]=1;
        // debug(i, dp[i]);

    }
    for(ll i=1;i<(1LL<<n);i++)
    {
        if(dp[i]!=0) continue;
        ll mn=LLONG_MAX;
        for(ll x=(i-1)&i;x>0;x=(x-1)&i)
        {
            mn=min(mn, dp[x]+dp[x^i]);
        }
        dp[i]=mn;
    }
    cout<<dp[(1LL<<n)-1]<<nl;

}

int main()
{
    BeatMeScanf;
    ll t=1;
    // cin>>t;

    int cs=0;
    while(t--){
        solve();
    }
    return 0;
}
