//#include<bits/stdc++.h>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <stack>
#include <vector>
#include <string>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <functional>
#define sdddd(x,y,z,k) scanf("%d%d%d%d", &x, &y, &z, &k)
#define sddd(x,y,z) scanf("%d%d%d", &x, &y, &z)
#define sdd(x,y) scanf("%d%d", &x, &y)
#define sd(x) scanf("%d", &x)
//#define mp make_pair
#define pb push_back
#define lson k<<1
#define rson k<<1|1
#define mid (l+r)/2
#define ms(x, y) memset(x, y, sizeof x)
#define MOD 1000000007
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int maxn = 105;
const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3f;
int n, m, t;
int ta, tb;
int ans = INF;
int mp[maxn][maxn], cnt[maxn], f[maxn][maxn];
int vis[maxn];
void dfs(int x, int tot)
{
if(tot >= ans)
return;
if(x > n)
{
ans = min(tot, ans);
return;
}
for(int i = 1; i <= tot; i++)
{
int flag = 0;
for(int j = 1; j <= cnt[i]; j++)
{
if(mp[x][f[i][j]])
{
flag = 1;
break;
}
}
if(flag == 0)
{
f[i][++cnt[i]] = x;
dfs(x+1, tot);
cnt[i]--;
}
}
f[tot+1][++cnt[tot+1]] = x;
dfs(x+1, tot+1);
--cnt[tot+1];
}
int main()
{
std::ios::sync_with_stdio(false);
cin >> n >> m;
while(m--)
{
cin >> ta >> tb;
mp[ta][tb] = 1;
mp[tb][ta] = 1;
}
dfs(1, 0);
cout << ans << endl;
return 0;
}