#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <climits>
#include <cstring>
#include <cassert>


using namespace std;
//using namespace atcoder;

#define REP(i, n) for (int i=0; i<(n); ++i)
#define RREP(i, n) for (int i=(int)(n)-1; i>=0; --i)
#define FOR(i, a, n) for (int i=(a); i<(n); ++i)
#define RFOR(i, a, n) for (int i=(int)(n)-1; i>=(a); --i)

#define SZ(x) ((int)(x).size())
#define ALL(x) (x).begin(),(x).end()

#define DUMP(x) cerr<<#x<<" = "<<(x)<<endl
#define DEBUG(x) cerr<<#x<<" = "<<(x)<<" (L"<<__LINE__<<")"<<endl;

template<class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
    os << "[";
    REP(i, SZ(v)) {
        if (i) os << ", ";
        os << v[i];
    }
    return os << "]";
}

template<class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
    return os << "(" << p.first << " " << p.second << ")";
}

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;
}

using ll = long long;
using ull = unsigned long long;
using ld = long double;
using P = pair<int, int>;
using vi = vector<int>;
using vll = vector<ll>;
using vvi = vector<vi>;
using vvll = vector<vll>;

const ll MOD = 1e9 + 7;
const int INF = INT_MAX / 2;
const ll LINF = LLONG_MAX / 2;
const ld eps = 1e-9;


// edit

void solve() {
    int N, M;
    cin >> N >> M;
    vector<vector<int>> G(N, vector<int>(N));
    REP(i, M) {
        int a, b;
        cin >> a >> b;
        a--, b--;
        G[a][b] = G[b][a] = 1;
    }


    vector<ll> dp(1 << N, INF);
    dp[0] = 1;

    for (int mask = 0; mask < 1 << N; ++mask) {
//        int amas = ~mask & ((1 << N) - 1);
        int amas = 0;
        for (int i = 0; i < N; ++i) {
            if (mask < 1 << i) break;
            if (mask >> i & 1) {
            } else {
                amas |= (1 << i);
            }
        }

        int tmp = amas;
        while (tmp > 0) {
            chmin(dp[tmp | mask], dp[tmp] + dp[mask]);
            tmp = (tmp - 1) & amas;
        }


        for (int i = 0; i < N; ++i) {
            if (mask >> i & 1) continue;

            int nmas = mask | (1ll << i);
            bool ok = true;
            for (int j = 0; j < N; ++j) {
                if (mask >> j & 1) {
                    if (!G[i][j]) {
                        ok = false;
                        break;
                    }
                }
            }
            if (ok) {
                chmin(dp[nmas], dp[mask]);
            } else {
                chmin(dp[nmas], dp[mask] + 1);
            }
        }
    }

    cout << dp.back() << endl;


}


int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);
//    std::ifstream in("input.txt");
//    std::cin.rdbuf(in.rdbuf());

    solve();


    return 0;
}

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using P=pair<ll,ll>;
ll N,M;
ll c[324];
ll dp[(1<<18)];
int main(){
cin>>N>>M;
  for(ll i=0;i<M;i++){
  ll a,b;cin>>a>>b;a--;b--;
    if(a<b){c[N*a+b]=1;}else{c[N*b+a]=1;}
  }for(ll i=1;i<(1<<N);i++)dp[i]=N+1;dp[0]=0;
  vector<P>A((1<<N));
  for(ll i=0;i<(1<<N);i++){
  ll sum=0;ll I=i;
    for(ll j=0;j<N;j++){sum+=I%2;I/=2;}
    A[i]=P(sum,i);
  }sort(A.begin(),A.end());vector<ll>B((1<<N));
  for(ll i=0;i<(1<<N);i++)B[i]=A[i].second;
  for(ll bit=0;bit<(1<<N);bit++){
  bool x=true;
    for(ll i=0;i<N-1;i++){
    if(bit & (1<<i)){
    for(ll j=i+1;j<N;j++)
      if(bit & (1<<j)){if(c[N*i+j]==0){x=false;break;}}
    
    }if(!x)break;
    }if(x)dp[bit]=1;
  }
  for(ll i=0;i<(1<<N);i++){
  ll bit=B[i];
    if(dp[bit]==1)continue;ll Min=N+1;
    for(ll bits=bit; ;bits=((bits-1)&bit)){
      if(dp[(bit^bits)]+dp[bits]<Min)Min=dp[(bit^bits)]+dp[bits];
      if(!bits)break;
    }dp[bit]=Min;
  }cout<<dp[(1<<N)-1]<<endl;
 
  return 0;
}