Problem: A robot is standing at the origin of the infinite two-dimensional plane. Each second the robot moves exactly 1 meter in one of the four cardinal directions: north, south, west, and east. For the first step the robot can choose any of the four directions, but then at the end of every second it has to turn 90 degrees left or right with respect to the direction it just moved in. For example, if the robot has just moved north or south, the next step it takes has to be either west or east, and vice versa.

The robot makes exactly n steps from its starting position according to the rules above. How many different points can the robot arrive to at the end? The final orientation of the robot can be ignored.

Input

The only line contains a single integer n (1 ≤ n ≤ 1000) — the number of steps the robot makes.

Output

Print a single integer — the number of different possible locations after exactly n steps.

Examples

Input


1


Output


4


Input


2


Output


4


Input


3


Output


12

Note

In the first sample case, the robot will end up 1 meter north, south, west, or east depending on its initial direction.

In the second sample case, the robot will always end up √{2} meters north-west, north-east, south-west, or south-east.

Solution (in JAVA):

Solution:
//package cp;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class Main {

    static long dist[][];
    static long mod=1000000000+7;
    static SegmentTree st;
    static int n;
    static HashSet<Long> set;
    static long fen[];
    static int x;
    static double arr[];
    static double arr2[];
    static long comb[];
    static long inverse[];
    static int blockSize;
    static int blockCount;
    static int d;
    static int k;
    static int pxor[];
    
    static ArrayList<HashMap<Integer,Integer>> lofmap;
    static int fenLen=1000000+100;
    static long dp[][];
    static ArrayList<ArrayList<Integer>> listList;
	public static void main(String[] args) {
        SReader sc=new SReader();
        int n=sc.ni();
        long mul=-1;
        if(n%2==0)
        {
        	mul=1;
        }
        long ans=1 + ( 3*n*(n + 4) + 2 -mul*(n*(n + 4) + 2) )/8;
        System.out.println(ans);
	}
	
	public static class pa
	{
		double a;
		double b;
		pa(double a,double b)
		{
			this.a=a;this.b=b;
		}
	}
	
	static TreeSet<String> map;
	public static void recurse(int r,int c,int steps,int prev)
	{
		if(steps==n)
		{
			if(!map.contains(r+" "+c))
			{
				map.add((r+" "+c));
				//System.out.println(r+" "+c);
			}
			return ;
		}
		if(prev==0)
		{
			recurse(r+1,c,steps+1,1);
			recurse(r-1,c,steps+1,1);
		}
		else
		{
			recurse(r,c+1,steps+1,0);
			recurse(r,c-1,steps+1,0);
		}
	}
	
	public static boolean valid(int x,int y) {
		return x>-1&&y>-1&&x<n&&y<n;
	}
	public static class ob
	{
		int x;int y;
		int prev;
		ob(int x,int y,int prev)
		{
			this.x=x;
			this.y=y;
		}
	}
	
	
	public static long nCr(int n,int r)
	{
		if(r==0)
			return 1;
		
		if(r>n)
			return 0;
		
		long denominator=(inverse[r]*inverse[n-r])%mod;
		long dinverse=denominator;
		return (comb[n]*dinverse)%mod;	
	}
	
	static long modInverse(long a) 
    { 
		long m=mod;
        long g = gcd(a, m); 
        return power(a, m - 2, m); 
    } 
  
    static long power(long x, long y, long m) 
    { 
        if (y == 0) 
            return 1; 
  
        long p = power(x, y / 2, m) % m; 
        p = (p * p) % m; 
  
        if (y % 2 == 0) 
            return p; 
        else
            return (x * p) % m; 
    } 
  
    static long gcd(long a, long b) 
    { 
        if (a == 0) 
            return b; 
        return gcd(b % a, a); 
    } 
	
	public static long getInRange(int p1,int p2)
	{
		return get(p2)-get(p1-1);
	}
	
	public static void add(int pos,long diff)
	{
		pos+=1;
		while(pos<fenLen)
		{
			fen[pos]+=diff;
			pos+=(pos&(-pos));
		}
	}
	
	public static long get(int pos)
	{
		pos+=1;
		long ans=0;
		while(pos>0)
		{
			ans+=fen[pos];
			pos-=pos&(-pos);
		}
		return ans;
	}
	
	
	static class cust implements Comparator<pair>
	{
		public int compare(pair p1,pair p2)
		{
			return p2.a-p1.a;
		}
	}
	
	static class pair
	{
		int a;
		int b;
		pair(int a,int b)
		{
			this.a=a;
			this.b=b;
		}
		
	}
    
    static final int MAXN = 100001;
 
    static Vector<Integer>[] tree = new Vector[MAXN];
    static int[][] path = new int[3][MAXN]; 
    static boolean flag;
 
    static void dfs(int cur, int prev, int pathNumber, int ptr, int node) 
    {
        for (int i = 0; i < tree[cur].size(); i++) 
        {
            if (tree[cur].get(i) != prev && !flag)
            {
                path[pathNumber][ptr] = tree[cur].get(i);
                if (tree[cur].get(i) == node) 
                {
                    flag = true;
 
                    path[pathNumber][ptr + 1] = -1;
                    return;
                }
                dfs(tree[cur].get(i), cur, pathNumber, ptr + 1, node);
            }
        }
    }
    static int lca(int a, int b) 
    {
        if (a == b)
            return a;
 
        path[1][0] = path[2][0] = 1;
 
        flag = false;
        dfs(1, 0, 1, 1, a);
 
        flag = false;
        dfs(1, 0, 2, 1, b);
 
        int i = 0;
        while (i < MAXN && path[1][i] == path[2][i])
            i++;
 
        return path[1][i - 1];
    }
 
    static void addEdge(int a, int b) 
    {
        tree[a].add(b);
        tree[b].add(a);
    }
    
    public static long getDist(int pos,int dest,int parent)
    {
        if(pos==dest)
            return 0;
        ArrayList<Integer> list=listList.get(pos);
        long dist=Integer.MAX_VALUE;
        for(int i:list)
        {
            if(i!=parent)
            {
                dist=Math.min(dist,1+getDist(i,dest,pos));
            }
        }
        return dist;
    }
    
    
    
    
    
    
    static class SegmentTree
    {
        static int MAX =10000000;
        //Trees For Max query
    static double tree[] = new double[MAX];
    static double lazy[] = new double[MAX];
    //Trees for Min query
    static double tree2[] =new double[MAX];
    static double lazy2[] = new double[MAX];

    static void updateRangeUtil(int si, int ss, int se, int us,
                                int ue, double diff)
    {
        if (lazy[si] != 0)
        {
            tree[si] += lazy[si];
            if (ss != se)
            {
                lazy[si * 2 + 1] += lazy[si];
                lazy[si * 2 + 2] += lazy[si];
            }
            lazy[si] = 0;
        }
        if (ss > se || ss > ue || se < us)
            return;

        if (ss >= us && se <= ue)
        {
            tree[si] += diff;
            if (ss != se)
            {
                lazy[si * 2 + 1] += diff;
                lazy[si * 2 + 2] += diff;
            }
            return;
        }
        int mid = (ss + se) / 2;
        updateRangeUtil(si * 2 + 1, ss, mid, us, ue, diff);
        updateRangeUtil(si * 2 + 2, mid + 1, se, us, ue, diff);
        tree[si] = Math.max(tree[si * 2 + 1], tree[si * 2 + 2]);
    }
    static void updateRange(int n, int us, int ue, double diff)
    {
        updateRangeUtil(0, 0, n - 1, us, ue, diff);
    }
    static double getMaxUtil(int ss, int se, int qs, int qe, int si)
    {
        if (lazy[si] != 0)
        {
            tree[si] += lazy[si];
            if (ss != se)
            {
                lazy[si * 2 + 1] += lazy[si];
                lazy[si * 2 + 2] += lazy[si];
            }
            lazy[si] = 0;
        }
        if (ss > se || ss > qe || se < qs)
            return Long.MIN_VALUE;
        if (ss >= qs && se <= qe)
        {
        	if(tree[si]==0)
        	{
        		return 1;
        	}
            return tree[si];
        }
        int mid = (ss + se) / 2;
        return (getMaxUtil(ss, mid, qs, qe, 2 * si + 1)*
                getMaxUtil(mid + 1, se, qs, qe, 2 * si + 2));
    }
    static double getMax(int n, int qs, int qe)
    {
        return getMaxUtil(0, n - 1, qs, qe, 0);
    }
    static void constructSTUtil(double arr[], int ss, int se, int si)
    {
        if (ss > se)
            return;
        if (ss == se)
        {
            tree[si] = arr[ss];
            return;
        }
        int mid = (ss + se) / 2;
        constructSTUtil(arr, ss, mid, si * 2 + 1);
        constructSTUtil(arr, mid + 1, se, si * 2 + 2);
        tree[si] =(tree[si * 2 + 1]*tree[si * 2 + 2]);
    }
    static void constructSTUtil2(long arr[], int ss, int se, int si)
    {
        if (ss > se)
            return;
        if (ss == se)
        {
            tree2[si] = arr[ss];
            return;
        }
        int mid = (ss + se) / 2;
        constructSTUtil2(arr, ss, mid, si * 2 + 1);
        constructSTUtil2(arr, mid + 1, se, si * 2 + 2);
        tree2[si] = Math.min(tree2[si * 2 + 1], tree2[si * 2 + 2]);
    }

    static void constructST(double arr[], int n)
    {
        constructSTUtil(arr, 0, n - 1, 0);
    }
    }
    
    
    static class SReader {
        BufferedReader br;
        StringTokenizer st;

        public SReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        public static void pr(Object s) {
            System.out.println(s);
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int ni() {
            return Integer.parseInt(next());
        }

        long nl() {
            return Long.parseLong(next());
        }

        double nd() {
            return Double.parseDouble(next());
        }

        String rl() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

}