Gerald plays the following game. He has a checkered field of size n × n cells, where m various cells are banned. Before the game, he has to put a few chips on some border (but not corner) board cells. Then for n - 1 minutes, Gerald every minute moves each chip into an adjacent cell. He moves each chip from its original edge to the opposite edge. Gerald loses in this game in each of the three cases:

  * At least one of the chips at least once fell to the banned cell. 
  * At least once two chips were on the same cell. 
  * At least once two chips swapped in a minute (for example, if you stand two chips on two opposite border cells of a row with even length, this situation happens in the middle of the row). 



In that case he loses and earns 0 points. When nothing like that happened, he wins and earns the number of points equal to the number of chips he managed to put on the board. Help Gerald earn the most points.

Input

The first line contains two space-separated integers n and m (2 ≤ n ≤ 1000, 0 ≤ m ≤ 105) — the size of the field and the number of banned cells. Next m lines each contain two space-separated integers. Specifically, the i-th of these lines contains numbers xi and yi (1 ≤ xi, yi ≤ n) — the coordinates of the i-th banned cell. All given cells are distinct.

Consider the field rows numbered from top to bottom from 1 to n, and the columns — from left to right from 1 to n.

Output

Print a single integer — the maximum points Gerald can earn in this game.

Examples

Input

3 1
2 2


Output

0


Input

3 0


Output

1


Input

4 3
3 1
3 2
3 3


Output

1

Note

In the first test the answer equals zero as we can't put chips into the corner cells.

In the second sample we can place one chip into either cell (1, 2), or cell (3, 2), or cell (2, 1), or cell (2, 3). We cannot place two chips.

In the third sample we can only place one chip into either cell (2, 1), or cell (2, 4).

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.StringTokenizer;

public class TC2
{

    static int N, M;
    static boolean[][] isAllowed, done;
    static boolean isR[], isC[];
    
    static void init()
    {
        isAllowed=new boolean[N][N];
        for( boolean[] b : isAllowed )
            Arrays.fill( b, true );
        isAllowed[0][0]=false;
        isAllowed[0][N-1]=false;
        isAllowed[N-1][0]=false;
        isAllowed[N-1][N-1]=false;
        isR=new boolean[N];
        Arrays.fill( isR, true );
        isC=new boolean[N];
        Arrays.fill( isC, true );
        isR[0]=false;
        isR[N-1]=false;
        isC[0]=false;
        isC[N-1]=false;
        done=new boolean[N][N];
        for( boolean[] d : done )
            Arrays.fill(d, false );
    }
    
    static Point getOpposite( Point p )
    {
        if( p.x== 0 )// first row
            return new Point( N-1, p.y );
           
        if( p.x== N-1 ) //last row
            return new Point( 0, p.y );
            
        if( p.y==0 ) //first col
            return new Point( p.x, N-1);
         
        if( p.y==N-1 ) //last col
            return new Point( p.x, 0 );
        
        return null;
    }
    
    static Point getSymmetric1( Point p )
    {
        return new Point( p.y, p.x );
    }

    static Point getSymmetric2( Point p )
    {
        return new Point( N-1-p.y, N-1-p.x );
    }
    
    static ArrayList<Point> findComponent( Point p )
    {
        ArrayList<Point> res=new ArrayList();
        HashSet<Point> done=new HashSet();
        res.add(p);
        done.add(p);
        boolean flag=true;
        while( flag )
        {
            flag=false;
            for( int i=0; i<res.size(); i++ )
            {
                Point x=res.get(i);
                ArrayList<Point> temp=new ArrayList();
                temp.add(getSymmetric1(x));
                temp.add(getSymmetric2(x));
                temp.add(getOpposite(x));
                for( Point t : temp )
                {
                    if( !done.contains( t ))
                    {
                        flag=true;
                        done.add( t );
                        res.add( t );
                    }
                }
            }
        }
        return res;
    }
    
   static boolean hasPath( Point p )
    {
        if( ( p.x == 0 ) || ( p.x == N-1 )) // check column
            return isC[p.y];
        else
            return isR[p.x];
    }
   
    static int cnt( Point p, ArrayList<Point> comp )
    {
        HashSet<Point> no=new HashSet();
        no.add( getOpposite(p));
        no.add( getSymmetric1(p));
        no.add( getSymmetric2(p));
        int res=0;
        
        for( Point c : comp )
        {
            done[c.x][c.y]=true;
            if( c==p )
            {
                res++;
                continue;
            }
            if( no.contains(c))
                continue;
            if( !isAllowed[c.x][c.y])
                continue;
            if( !hasPath(c))
                continue;
            if( ( p.x == c.x ) || ( p.y == c.y ) )
                continue;
            else
                res++;
        }
        return res;
    }
    
    static int process( ArrayList<Point> comp )
    {
        int res=1;
        
        for( Point p : comp )
        {
            if( !isAllowed[p.x][p.y])
                continue;
            if( !hasPath(p))
                continue;
            res=Math.max( res, cnt(p, comp));
        }
        
        return res;
    }
    
    static void solve()
    {
        int[] ends={0, N-1};
        int cnt=0;
        // first and last rows
        
        for( int r : ends )
        {
            for( int c=1; c<N-1; c++ )
            {
               
                if(( !isAllowed[r][c] )||( !isC[c]) || ( done[r][c] ))
                {
                    done[r][c]=true;
                    continue;
                    
                }
                
                 done[r][c]=true;
                Point p=new Point( r, c );
                ArrayList<Point> comp=findComponent(p);
                cnt+=process(comp);
            }
        }
        
        //first and last cols
        for( int c : ends )
        {
            for( int r=1; r<N-1; r++ )
            {
                if(( !isAllowed[r][c] )||( !isR[r]) || ( done[r][c] ))
                    continue;
                Point p=new Point( r, c );
                ArrayList<Point> comp=findComponent(p);
                cnt+=process(comp);
            }
        }
        
        System.out.println( cnt );
    }
    
    public static void main( String[] args ) throws IOException
    {
        BufferedReader br=new BufferedReader( new InputStreamReader( System.in ));
        String s=br.readLine();
        StringTokenizer tok=new StringTokenizer(s);
        N=Integer.parseInt( tok.nextToken() );
        M=Integer.parseInt( tok.nextToken() );
        init();
        for( int i=0; i<M; i++ )
        {
             s=br.readLine();
             tok=new StringTokenizer(s);
             int x=Integer.parseInt(tok.nextToken());
             int y=Integer.parseInt(tok.nextToken());
             isAllowed[x-1][y-1]=false;
             isR[x-1]=false;
             isC[y-1]=false;
        }
        solve();
    }
}


class Point implements Comparable
{
    int x, y; // first -> primary key for sorting/comparison
    
    public Point( int _x1, int _x2 )
    {
        x = _x1;
        y = _x2;
    }
    
    public int compareTo( Object o )
    {
        Point n = ( Point ) o ;
        
        if( x != n.x )
            return x-n.x;
        
        else
            return y-n.y;
    }
    
    public int hashCode() // Always check for equality after retrieving from hashtable to detect collisions ! 
    {
        int result = 23;
        result = 31*result + x;
        result = 31*result + y;
        return result;
        
    }
    
    public boolean equals( Object o )
    {
        Point p = ( Point ) o;
        
        if( x == p.x )
            if( y == p.y )
                return true;
        
        return false;
    }
    
    
}