#include<bits/stdc++.h>usingnamespacestd;#define ff first#define ss secondtypedefpair<int,int>PII;constintN=110;intn,m;PIImatch[N][N];boolg[N][N],st[N][N];intdx[]={1,-1,0,0};intdy[]={0,0,1,-1};boolfind(intx,inty){for(inti=0;i<4;i++){inta=x+dx[i],b=y+dy[i];if(a&&a<=n&&b&&b<=n&&!g[a][b]&&!st[a][b]){st[a][b]=true;autot=match[a][b];if(t.ff==-1||find(t.ff,t.ss)){match[a][b]={x,y};returntrue;}}}returnfalse;}intmain(){ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin>>n>>m;while(m--){inta,b;cin>>a>>b;g[a][b]=true;}memset(match,-1,sizeofmatch);intres=0;for(inti=1;i<=n;i++)for(intj=1;j<=n;j++)if((i+j)%2&&!g[i][j]){memset(st,false,sizeofst);if(find(i,j))res++;}cout<<res<<endl;return0;}