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 cf.cf1459;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;
import java.util.function.IntConsumer;

public class B {
    private static final String INPUT = "1000";
    private static final int MOD = 1_000_000_007;

    FastScanner sc;
    PrintWriter out;

    public static void main(String[] args) {
        new B().run();
    }

    public B() {
        sc = new FastScanner(oj ? System.in : new ByteArrayInputStream(INPUT.getBytes()));
        out = new PrintWriter(System.out);
    }

    public void run() {
        long start = System.currentTimeMillis();
        times(1, this::solve);
        out.flush();
        tr(System.currentTimeMillis() - start + "ms");
    }

    static class IntArray {
        public int[] array;
        public int size;

        public IntArray() {
            this(10);
        }

        public IntArray(int capacity) {
            capacity = Math.max(capacity, 10);
            this.array = new int[capacity];
        }

        public void add(int n) {
            ensureCapacity(size + 1);
            array[size++] = n;
        }

        public void sort() {
            shuffle();
            Arrays.sort(array, 0, size);
        }

        void shuffle() {
            for (int i = 0; i < size; i++) {
                int r = i + (int) (Math.random() * (size - i));
                { int tmp = array[i]; array[i] = array[r]; array[r] = tmp; }
            }
        }

        public boolean contains(int n) {
            return contains(n, -1, size);
        }

        public boolean contains(int n, int from) {
            return contains(n, from, size);
        }

        boolean contains(int n, int from, int till) {
            int lo = from;
            int hi = till;
            while (hi-lo > 1) {
                int med = (hi+lo)>>1;
                int mValue = array[med];
                if (mValue == n) return true;
                else if (mValue < n) lo = med;
                else hi = med;
            }
            return false;
        }

        private void ensureCapacity(int cap) {
            if (cap > array.length) grow();
        }

        private void grow() {
            int oldCapacity = array.length;
            int newCapacity = oldCapacity + (oldCapacity >> 1);
            array = Arrays.copyOf(array, newCapacity);
        }
    }

    static class Bot {
        int x, y;
        boolean dir;
        int step;

        public Bot(int x, int y, boolean dir, int step) {
            this.x = x;
            this.y = y;
            this.dir = dir;
            this.step = step;
        }
    }


    int e = 500;
    public void solve(int time) {
        int n = sc.nextInt();

        int size = e+3; //plus sentinels
        int[][]dp = new int[size][size];
        for (int[] ints : dp) {
            Arrays.fill(ints, -1);
        }
        dp[1][1] = 0;
        for (int i = 0; i < n; i++) {
            int next = i+1;
            if (i%2 == 0) {
                for (int j = 1; j < size; j++) {
                    for (int k = 1; k < size; k++) {
                        if (dp[j][k] == i) {
                            dp[j + 1][k] = next;
                            dp[j - 1][k] = next;
                        }
                    }
                }
            } else {
                for (int j = 1; j < size; j++) {
                    for (int k = 1; k < size; k++) {
                        if (dp[j][k] == i) {
                            dp[j][k+1] = next;
                            dp[j][k-1] = next;
                        }
                    }
                }
            }
        }

        int[][]dp2 = new int[size][size];
        for (int[] ints : dp2) {
            Arrays.fill(ints, -1);
        }
        dp2[1][1] = 0;
        for (int i = 0; i < n; i++) {
            int next = i+1;
            if (i%2 == 0) {
                for (int j = 1; j < size; j++) {
                    for (int k = 1; k < size; k++) {
                        if (dp2[j][k] == i) {
                            dp2[j][k + 1] = next;
                            dp2[j][k - 1] = next;
                        }
                    }
                }
            } else {
                for (int j = 1; j < size; j++) {
                    for (int k = 1; k < size; k++) {
                        if (dp2[j][k] == i) {
                            dp2[j + 1][k] = next;
                            dp2[j - 1][k] = next;
                        }
                    }
                }
            }
        }

        int ans = 0;
        for (int i = 1; i < size; i++) {
            for (int j = 1; j < size; j++) {
                if (dp[i][j] == n || dp2[i][j] == n) {
                    if (i == 1 && j == 1) {
                        ans++;
                    } else if (i == 1 || j == 1) {
                        ans += 2;
                    } else {
                        ans += 4;
                    }
                }
            }
        }
        writeln(ans);
    }

    //---------------------------------------------------------------------------------------------------

    /**
     * If searched element doesn't exist, returns index of first element which is bigger than searched value.<br>
     * If searched element is bigger than any array element function returns first index after last element.<br>
     * If searched element is lower than any array element function returns index of first element.<br>
     * If there are many values equals searched value function returns first occurrence.<br>
     */
    private static int lowerBound(long[] arr, long key) {
        int lo = 0;
        int hi = arr.length - 1;
        while (lo < hi) {
            int mid = (lo + hi) / 2;
            if (key <= arr[mid]) {
                hi = mid - 1;
            } else {
                lo = mid + 1;
            }
        }
        return arr[lo] < key ? lo + 1 : lo;
    }

    /**
     * Returns index of first element which is grater than searched value.
     * If searched element is bigger than any array element, returns first index after last element.
     */
    private static int upperBound(long[] arr, long key) {
        int lo = 0;
        int hi = arr.length - 1;
        while (lo < hi) {
            int mid = (lo + hi) / 2;
            if (key >= arr[mid]) {
                lo = mid + 1;
            } else {
                hi = mid;
            }
        }
        return arr[lo] <= key ? lo + 1 : lo;
    }

    private static int upperBound(int[] arr, int key) {
        int lo = 0;
        int hi = arr.length - 1;
        while (lo < hi) {
            int mid = (lo + hi) / 2;
            if (key >= arr[mid]) {
                lo = mid + 1;
            } else {
                hi = mid;
            }
        }
        return arr[lo] <= key ? lo + 1 : lo;
    }

    private long[] prefixSum(long[] array) {
        long[] result = new long[array.length];
        result[0] = array[0];
        for (int i = 1; i < array.length; i++) result[i] = result[i - 1] + array[i];
        return result;
    }

    private int[] sort(int[] array) {
        shuffle(array);
        Arrays.sort(array);
        return array;
    }

    private static void shuffle(int[] array) {
        Random random = new Random();
        for (int i = array.length - 1; i > 0; i--) {
            int index = random.nextInt(i + 1);
            {
                int tmp = array[index];
                array[index] = array[i];
                array[i] = tmp;
            }
        }
    }

    private static int gcd(int a, int b) {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
        return gcd.intValue();
    }

    private long[] sort(long[] array) {
        shuffle(array);
        Arrays.sort(array);
        return array;
    }

    private static void shuffle(long[] array) {
        Random random = new Random();
        for (int i = array.length - 1; i > 0; i--) {
            int index = random.nextInt(i + 1);
            {
                long tmp = array[index];
                array[index] = array[i];
                array[i] = tmp;
            }
        }
    }

    static class ExitException extends RuntimeException {
    }

    private int iread() {
        int res = sc.nextInt();
        if (res <= 0) {
            throw new ExitException();
        }
        return res;
    }

    private void iwrite(char[] chars) {
        for (char chr : chars) {
            out.print(chr);
        }
        out.println();
        out.flush();
    }

    private void write(Object obj) {
        out.print(obj);
    }

    private void writeln(Object obj) {
        out.println(obj);
    }

    private void writeln() {
        out.println();
    }

    private void answer(Object ans) {
        out.println(ans);
        throw new ExitException();
    }

    private void times(int n, IntConsumer consumer) {
        for (int i = 0; i < n; i++) {
            try {
                consumer.accept(i);
            } catch (ExitException ignored) {
            }
        }
    }

    private int[] readIntArray(int n) {
        int[] res = new int[n];
        for (int i = 0; i < n; i++) {
            res[i] = sc.nextInt();
        }
        return res;
    }

    private long[] readLongArray(int n) {
        long[] res = new long[n];
        for (int i = 0; i < n; i++) {
            res[i] = sc.nextLong();
        }
        return res;
    }

    static class FastScanner {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        FastScanner(InputStream stream) {
            this.stream = stream;
        }

        int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) return -1;
            }
            return buf[curChar++];
        }

        boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        boolean isEndline(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String next() {
            int c = read();
            while (isSpaceChar(c)) c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public String nextLine() {
            int c = read();
            while (isEndline(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndline(c));
            return res.toString();
        }

    }

    private boolean oj = System.getProperty("ONLINE_JUDGE") != null;

    private void tr(Object... o) {
        if (!oj) System.out.println(Arrays.deepToString(o));
    }
}