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.

Difficulty: EASY
Tags: Mathematics

Starter code:

Solutions:
a = int(input())
print((a - 2) * (a - 2))


n = int(input())
ans = n - 3 + 2 * (n - 3) + (n - 4) * (n - 3) + 1
print(ans)


a = int(input())
print(pow(a - 2, 2))


n = int(input())
print(n - 2 + 2 * (n - 3) + (n - 3) * (n - 4))


def main():
	print((int(input()) - 2) ** 2)
main()


n = int(input().strip())
print((n - 2) * (n - 2))


n = int(input())
print((n - 2) ** 2)


from sys import stdin

def main():
	inp = stdin
	a = int(inp.readline().strip())
	print((a - 2) ** 2)
main()


n = int(input())
tmp = n - 2
print(tmp * tmp)


a = int(input())
b = a - 2
print(b ** 2)


import itertools as it
import functools
import operator
import collections
import math
import sys

def solve(n):
	count = n - 3 + 1
	for i in range(2, n + 1):
		if i == 2 or i == n:
			count += n - 3
		else:
			count += n - 4
	return count

def print_stderr(*args, **kwargs):
	print(*args, file=sys.stderr, **kwargs)

def main():
	n = int(input())
	result = solve(n)
	print_stderr(result)
	print(result)
main()


import sys
input_file = sys.stdin
number = int(input_file.readline().rstrip())
print((number - 2) ** 2)


n = int(input())
k = 1
t = 3
for i in range(n - 3):
	k = k + t
	t = t + 2
print(k)


import sys
from sys import stdin, stdout
n = int(input())
stdout.write(str((n - 2) ** 2) + '\n')


k = 0
t = 1
for _ in range(int(input()) - 2):
	k += t
	t += 2
print(k)


n = int(input())

def solve(n):
	if n == 3:
		return 1
	first = n - 3
	twoAdjacent = n - 3
	others = n - 4
	all = first + 2 * twoAdjacent + (n - 3) * others
	return all + 1
print(solve(n))


n = int(input())
res = 1 + 3 * (n - 3) + max(0, (n - 4) * (n - 3))
print(res)


n = int(input())
print(n * n - 4 * n + 4)


n = int(input())
i = n - 2
pro = i * i
print(pro)


n = int(input())
print(1 + 3 * (n - 3) + (n - 3) * (n - 4))


n = int(input())
print(pow(n - 2, 2))


a = int(input())
z = (a - 2) ** 2
print(z)


def the_monster_and_the_squirrel(n):
	return (n - 2) ** 2
n = int(input())
result = the_monster_and_the_squirrel(n)
print(result)


import math as mt
import sys, string
input = sys.stdin.readline
import random
import collections
from heapq import heappush, heapify, heappop
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
n = I()
print((n - 2) ** 2)


x = int(input())
y = x - 2
z = y ** 2
print(z)


n = int(input())
if n == 3:
	print(1)
elif n == 4:
	print(4)
else:
	print(1 + (n - 3) * (n - 1))


N = int(input())
a = 0
step = 1
for i in range(3, N + 1):
	a += step
	step += 2
print(a)


n = int(input())
k = n - 3
if n == 3:
	print(1)
else:
	res = k + 1
	res = res + k + k
	for i in range(3, n):
		if i - 3 > 0:
			res = res + (i - 3)
		if n - i - 1 > 0:
			res = res + (n - i - 1)
	print(res)


n = int(input())
res = (n - 2) * (n - 2)
print(res)


print((int(input()) - 3 + 1) ** 2)


n = int(input())
if n == 3:
	print(1)
else:
	print((n - 2) ** 2)


n = int(input())
a = [0 for i in range(n + 2)]
a[3] = 1
a[4] = 4
i = 5
k = 0
while i <= n:
	a[i] = i + a[i - 1] + k
	i += 1
	k += 1
print(a[n])


n = int(input())
N = 0
for i in range(2, n):
	N = N + 2 * i - 3
print(N)


n = int(input())
print(n - 2 + n - 3 + max(n - 4, 0) * (n - 3) + n - 3)


import sys
n = int(input())
ans = (n - 4) * (n - 3) + 2 * (n - 3) + (n - 2)
print(ans)


n = int(input())
cnt = (n - 2) ** 2
print(cnt)


(n,) = map(int, input().split())
print((n - 3) * (n - 1) + 1)


n = int(input())
res = 1
carrier = 3
for i in range(3, n):
	res = res + carrier
	carrier += 2
print(res)


N = int(input())
print((N - 2) * (N - 2))


from sys import stdin
n = int(stdin.readline())
print((n - 2) ** 2)


a = int(input())
result = (a - 2) * (a - 2)
print(result)


from sys import stdin
n = int(stdin.readline().strip())
out = (n - 2) ** 2
print(out)


n = int(input())
ans = (n - 2) * (n - 2)
print(ans)


import math
from decimal import *
import sys
n = int(input())
print((n - 3) * n - (n - 3) + 1)


import sys
n = int(input())
print(1 + 3 * (n - 3) + (n - 3) * (n - 4))


print((int(input()) - 2) ** 2)


import sys
from math import *
sys.setrecursionlimit(100000000)
n = int(input())
nb = 0
for i in range(2, n):
	nb += n - i
	nb += i - 1
	nb -= 1
print(nb)


n = int(input())
region = 3 * n - 8 + (n - 3) * (n - 4)
print(region)


from sys import stdin
a = int(stdin.readline()) - 2
print(a * a)


n = int(input())
p = [0] * (n + 1)
p[3] = 1
for i in range(4, n + 1):
	p[i] = p[i - 1] + 2 * i - 5
print(p[n])


import sys
import string
from collections import Counter, defaultdict
from math import fsum, sqrt, gcd, ceil, factorial
from operator import *
from itertools import accumulate
inf = float('inf')
flush = lambda : sys.stdout.flush
comb = lambda x, y: factorial(x) // factorial(y) // factorial(x - y)
ip = lambda : input()
ii = lambda : int(input())
r = lambda : map(int, input().split())
rr = lambda : list(r())
n = ii()
print((n - 2) ** 2)


def solve():
	n = int(input())
	return (n - 2) ** 2
ans = solve()
print(ans)


n = int(input())
res = 1
for i in range(n):
	if i == 0:
		res += n - 3
	elif i == 1 or i == n - 1:
		res += n - 3
	else:
		res += n - 4
print(res)


import sys

def main():
	N = int(sys.stdin.read())
	result = (N - 3) * 3 + (N - 4) * (N - 3) + 1
	print(result)
main()


count = int(input())
print((count - 2) * (count - 2))


n = int(input())
res = [i * i for i in range(1, 54330)]
print(res[n - 3])


n = int(input())
a = [0] * (n + 1)
a[3] = 1
for i in range(4, n + 1):
	a[i] = i - 2 + a[i - 1] + i - 3
print(a[n])


f = lambda n: n * n - 4 * n + 4
print(f(int(input())))


n = int(input())
a = (n - 2) * (n - 2)
print(a)


def belochka(n):
	return (n - 2) ** 2
print(belochka(int(input())))


n = int(input())
cnt = n - 3
ans = n * cnt - cnt + 1
print(ans)


x = int(input())
print((x - 2) ** 2)


import sys
x = int(input()) - 1
print(x * (x - 2) + 1)


n = int(input())
tmp = -1
num = 0
for i in range(3, n + 1):
	tmp += 2
	num += tmp
print(num)


x = int(input())
add = 1
ans = 0
for i in range(0, x - 2):
	ans = ans + add
	add = add + 2
print(ans)


n = int(input())
print((n - 2) * (n - 1) - (n - 2))


def STR():
	return list(input())

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def MAP2():
	return map(float, input().split())

def LIST():
	return list(map(int, input().split()))

def STRING():
	return input()
import string
import sys
from heapq import heappop, heappush
from bisect import *
from collections import deque, Counter, defaultdict
from math import *
from itertools import permutations, accumulate
dx = [-1, 1, 0, 0]
dy = [0, 0, 1, -1]
n = INT()
print(int(pow(n - 2, 2)))


from sys import stdin
n = int(stdin.readline().strip())
x = n - 2 + n - 3 + n - 3 + (n - 4) * (n - 3)
print(x)


n = int(input())
big = n - 3
print(3 * big + (n - 3) * (big - 1) + 1)


n = int(input())
res = 3 * n - 8
if n > 3:
	res += (n - 4) * (n - 3)
print(res)


a = int(input())
print((a - 1) * (a - 3) + 1)


import sys
a = int(input())
print((a - 2) ** 2)


from fractions import gcd
n = input()
n = int(n)
ans = 1 + 3 * (n - 3) + (n - 3) * (n - 4)
print(ans)


v = int(input())
print(str(v ** 2 - 4 * v + 4))


n = int(input())
k = (n - 2) * (n - 2)
print(k)


import time
n = int(input())
start = time.time()
print(1 + (n - 1) * (n - 3))
finish = time.time()


import string
import math
from collections import Counter

def array_int():
	return [int(i) for i in input().split()]

def vary(number_of_variables):
	if number_of_variables == 1:
		return int(input())
	if number_of_variables >= 2:
		return map(int, input().split())

def makedict(var):
	return dict(Counter(var))
mod = 1000000007
n = vary(1)
print((n - 2) * (n - 2))