Ari the monster always wakes up very early with the first ray of the sun and the first thing she does is feeding her squirrel.

Ari draws a regular convex polygon on the floor and numbers it's vertices 1, 2, ..., n in clockwise order. Then starting from the vertex 1 she draws a ray in the direction of each other vertex. The ray stops when it reaches a vertex or intersects with another ray drawn before. Ari repeats this process for vertex 2, 3, ..., n (in this particular order). And then she puts a walnut in each region inside the polygon.

<image>

Ada the squirrel wants to collect all the walnuts, but she is not allowed to step on the lines drawn by Ari. That means Ada have to perform a small jump if she wants to go from one region to another. Ada can jump from one region P to another region Q if and only if P and Q share a side or a corner.

Assuming that Ada starts from outside of the picture, what is the minimum number of jumps she has to perform in order to collect all the walnuts?

Input

The first and only line of the input contains a single integer n (3 ≤ n ≤ 54321) - the number of vertices of the regular polygon drawn by Ari.

Output

Print the minimum number of jumps Ada should make to collect all the walnuts. Note, that she doesn't need to leave the polygon after.

Examples

Input

5


Output

9


Input

3


Output

1

Note

One of the possible solutions for the first sample is shown on the picture above.
import java.io.*;
import java.util.*;

public class Main {
    private final static InputReader ir = new InputReader(System.in);
    private final static OutputWriter ow = new OutputWriter(System.out);
    private final static int INF = Integer.MAX_VALUE;
    private final static int NINF = Integer.MIN_VALUE;
    private final static double PI = Math.PI;

    public static void main(String[] args) throws IOException {
        try {
            task();
        } finally {
            boolean exc = false;
            try {
                ir.close();
            } catch (IOException e) {
                e.printStackTrace();
                exc = true;
            }
            try {
                ow.close();
            } catch (IOException e) {
                e.printStackTrace();
                exc = true;
            }
            if (exc) System.exit(1);
        }
    }

    private static void task() throws IOException {
        int n = ir.nextInt();

        long ans = 1 + 3 * (n - 3) + (n - 4L) * (n - 3L);

        ow.print(ans);


    }

    private static int max(int... objects) {
        if (objects.length == 0)
            throw new IllegalArgumentException("objects.length == 0");
        int max = objects[0];
        for (int i = 1; i < objects.length; ++i) {
            if (max < objects[i])
                max = objects[i];
        }
        return max;
    }

    private static int min(int... objects) {
        if (objects.length == 0)
            throw new IllegalArgumentException("objects.length == 0");
        int min = objects[0];
        for (int i = 1; i < objects.length; ++i) {
            if (min > objects[i])
                min = objects[i];
        }
        return min;
    }

    private static long pow(int x, int n) {
        if (x == 0) return 0;
        if (x == 1 || n == 0) return 1;
        if (x == 2) return x << (n - 1);
        if (n == 1) return x;
        long t = pow(x, n / 2);
        if (n % 2 == 0) return t * t;
        else return t * t * x;
    }

    private static int abs(int a) {
        return (a >= 0 ? a : -a);
    }
}

class SQRTDecomposition {
    private int[] array;
    private int len;
    private int[] max;
    private int[] min;

    public SQRTDecomposition(int[] arr, boolean useIt) {
        if (useIt)
            array = arr;
        else {
            array = new int[arr.length];
            System.arraycopy(arr, 0, array, 0, arr.length);
        }
        len = (int) Math.sqrt(array.length) + 1;
        max = new int[len];
        min = new int[len];
        for (int i = 0; i < array.length; ++i) {
            max[i / len] = min[i / len] = array[i];
        }
        for (int i = 0; i < array.length; ++i) {
            max[i / len] = Math.max(max[i / len], array[i]);
            min[i / len] = Math.min(min[i / len], array[i]);
        }
    }

    public int get(int i) {
        if (i <= 0 || i >= array.length)
            throw new IndexOutOfBoundsException("Index: " + i);
        return array[i];
    }

    public int length() {
        return array.length;
    }

    public int max(int l, int r) {
        int cl = l / len, cr = r / len;
        int m = array[l];
        if (cl == cr) {
            for (int i = l; i <= r; ++i) {
                if (array[i] > m) m = array[i];
            }
        } else {
            for (int i = l, end = (cl + 1) * len - 1; i <= end; ++i)
                if (array[i] > m) m = array[i];
            for (int i = cl + 1; i <= cr - 1; ++i)
                if (max[i] > m) m = max[i];
            for (int i = cr * len; i <= r; ++i)
                if (array[i] > m) m = array[i];
        }
        return m;
    }

    public int min(int l, int r) {
        int cl = l / len, cr = r / len;
        int m = array[l];
        if (cl == cr) {
            for (int i = l; i <= r; ++i) {
                if (array[i] < m) m = array[i];
            }
        } else {
            for (int i = l, end = (cl + 1) * len - 1; i <= end; ++i)
                if (array[i] < m) m = array[i];
            for (int i = cl + 1; i <= cr - 1; ++i)
                if (min[i] < m) m = min[i];
            for (int i = cr * len; i <= r; ++i)
                if (array[i] < m) m = array[i];
        }
        return m;
    }
}

class InputReader implements AutoCloseable {
    private final InputStream in;
    private int capacity;
    private byte[] buffer;
    private int len = 0;
    private int cur = 0;

    public InputReader(InputStream stream) {
        this(stream, 100_000);
    }

    public InputReader(InputStream stream, int capacity) {
        this.in = stream;
        this.capacity = capacity;
        buffer = new byte[capacity];
    }

    private int read() {
        if (cur >= len) {
            try {
                cur = 0;
                len = in.read(buffer, 0, capacity);
                if (len <= 0)
                    return -1;
            } catch (IOException e) {
                throw new InputMismatchException();
            }
        }
        return buffer[cur++];
    }

    private boolean isSpace(int c) {
        return c == ' ' || isEscape(c);
    }

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

    private int readSkipSpace() {
        int c;
        do {
            c = read();
        } while (isSpace(c));
        return c;
    }

    int nextInt() {
        int c = readSkipSpace();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res = res * 10 + c - '0';
            if (res < 0)
                throw new InputMismatchException();
            c = read();
        } while (!isSpace(c));
        res *= sgn;
        return res;
    }

    public long nextLong() {
        int c = readSkipSpace();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res = res * 10 + c - '0';
            if (res < 0)
                throw new InputMismatchException();
            c = read();
        } while (!isSpace(c));
        res *= sgn;
        return res;
    }

    int nextChar() {
        return readSkipSpace();
    }

    String nextLine(int initialCapacity) {
        StringBuilder res = new StringBuilder(initialCapacity);
        int c = readSkipSpace();
        do {
            res.append((char) (c));
            c = read();
        } while (!isEscape(c));
        return res.toString();
    }

    @Override
    public void close() throws IOException {
        in.close();
    }
}

class OutputWriter implements Flushable, AutoCloseable {
    private byte[] buf;
    private int capacity;
    private int count;
    private OutputStream out;

    public OutputWriter(OutputStream stream) {
        out = stream;
        capacity = 10_000;
        buf = new byte[capacity];
    }

    public OutputWriter(OutputStream stream, int capacity) {
        if (capacity <= 0)
            throw new IllegalArgumentException("capacity <= 0");
        out = stream;
        this.capacity = capacity;
        buf = new byte[capacity];
    }

    public void write(int b) throws IOException {
        if (count >= buf.length)
            flushBuffer();
        buf[count++] = (byte) b;
    }

    public void write(byte[] bytes, int off, int len) throws IOException {
        if (len >= buf.length) {
            flushBuffer();
            out.write(bytes, off, len);
            return;
        }
        if (len > buf.length - count)
            flushBuffer();
        System.arraycopy(bytes, off, buf, count, len);
        count += len;
    }

    public void write(byte[] bytes) throws IOException {
        write(bytes, 0, bytes.length);
    }

    public void print(String str) throws IOException {
        write(str.getBytes());
    }

    public void println() throws IOException {
        print("\n");
    }

    public void print(Object object) throws IOException {
        print(object.toString());
    }

    public void println(Object object) throws IOException {
        print(object.toString());
        println();
    }

    public void print(int... ints) throws IOException {
        print(" ", ints);
    }

    public void println(int... ints) throws IOException {
        print(ints);
        println();
    }

    public void println(String separator, int... ints) throws IOException {
        print(separator, ints);
        println();
    }

    public void print(String separator, int... ints) throws IOException {
        if (ints.length == 0) throw new IllegalArgumentException("ints.length == 0");
        for (int i = 0; i < ints.length; ++i) {
            if (i != 0) print(separator);
            print(ints[i]);
        }
    }

    private void flushBuffer() throws IOException {
        if (count > 0) {
            out.write(buf, 0, count);
            count = 0;
        }
    }

    @Override
    public void flush() throws IOException {
        flushBuffer();
        out.flush();
    }

    @Override
    public void close() throws IOException {
        flush();
        out.close();
    }
}





