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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;
import java.util.Stack;
import java.util.TreeSet;

 
 
public class ck {
 
	private static int[] tree;
	private static int[] a;
	private static HashMap<Integer,Integer> map = new HashMap<Integer,Integer>();
	
	public static void main(String[] args) throws NumberFormatException, IOException{
		
		Scanner in = new Scanner(System.in);
		
		long n = in.nextInt();
		long s = (n-2)*(n-2);
		System.out.println(s);
		
	}
	
	
	public static void Range(int[] numbers, int target) {
	    if (numbers == null)
	        return;

	    int low = 0, high = numbers.length - 1;
	    // get the start index of target number
	    int startIndex = -1;
	    while (low <= high) {
	        int mid = (high - low) / 2 + low;
	        if (numbers[mid] > target) {
	            high = mid - 1;
	        } else if (numbers[mid] == target) {
	            startIndex = mid;
	            high = mid - 1;
	        } else
	            low = mid + 1;
	    }

	    // get the end index of target number
	    int endIndex = -1;
	    low = 0;
	    high = numbers.length - 1;
	    while (low <= high) {
	        int mid = (high - low) / 2 + low;
	        if (numbers[mid] > target) {
	            high = mid - 1;
	        } else if (numbers[mid] == target) {
	            endIndex = mid;
	            low = mid + 1;
	        } else
	            low = mid + 1;
	    }

	    if (startIndex != -1 && endIndex != -1){
	        for(int i=0; i+startIndex<=endIndex;i++){
	            if(i>0)
	                System.out.print(',');
	            System.out.print(i+startIndex);
	        }
	    }
	}
	
	 // union code starts	
	
	 private static void initialize( int Arr[ ],int size[], int N)
	    {
	        for(int i = 0;i<N;i++)
	        {
	        	Arr[ i ] = i ;
	        	size[ i ] = 1;
	        }
	    }
	 
	 private static int root(int Arr[ ],int i)
	    {
	        while(Arr[ i ] != i)           //chase parent of current element until it reaches root
	        {
	            Arr[ i ] = Arr[ Arr[ i ] ] ; 
	            i = Arr[ i ];
	        }
	        return i;
	    }
	 
	 private static void union(int Arr[ ],int size[ ],int A,int B)
	    {
	        int root_A = root(Arr,A);
	        int root_B = root(Arr,B);
	     
	        if(root_A != root_B){
	        	 if(size[root_A] < size[root_B ])
	 	        {
	        		 Arr[ root_A ] = Arr[root_B];
	        		 size[root_B] += size[root_A];	 	
	 	        }
	 	        else
	 	        {   	
	 	        	Arr[ root_B ] = Arr[root_A];
	 	        	size[root_A] += size[root_B];	 	   
	 	        }	
	        }
	    }
	 
	 private static boolean find(int Arr[],int A,int B)
	    {
	        if( root(Arr,A)==root(Arr,B) )       //if A and B have the same root, it means that they are connected.
	        return true;
	        else
	        return false;
	    }
	 
	 
	 // union code ends
	
	
	 
	 // Segment tree code begins
	 
	 
	 static void build(int node,int start,int end)
	 {
	 if(start==end)
	 tree[node]=a[start];
	 else
	 {
	 int mid=(start+end)/2;
	 build(2*node,start,mid);
	 build(2*node+1,mid+1,end);
	 if(tree[2*node]<tree[2*node+1])
	 tree[node]=tree[2*node];
	 else
	 tree[node]=tree[2*node+1];
	 }
	 }
	 
	 
	 static void update(int node,int start,int end,int idx,int val)
	 {
	 if(start==end)
	 {
	 a[idx]=val;
	 tree[node]=val;
	 }
	 else
	 {
	 int mid=(start+end)/2;
	 if(idx>=start&&idx<=mid)
	 update(2*node,start,mid,idx,val);
	 else
	 update(2*node+1,mid+1,end,idx,val);
	 if(tree[2*node]<tree[2*node+1])
	 tree[node]=tree[2*node];
	 else
	 tree[node]=tree[2*node+1];
	 }
	 }
	 
	 static int query(int node,int start,int end,int l,int r)
	 {
	 if(l>end||start>r)
	 return 100005;
	 if(l<=start&&r>=end)
	 return tree[node];
	 int p1,p2;
	 int mid=(start+end)/2;
	 p1=query(2*node,start,mid,l,r);
	 p2=query(2*node+1,mid+1,end,l,r);
	 if(p1<p2)
	 return p1;
	 else
	 return p2;
	 }
	 
	 
	 
}



class node{
	int i;
	int b;
}


class MyComp2 implements Comparator<node>{
    
	@Override
	public int compare(node o1, node o2) {
		if(o1.b>o2.b){
			return 1;
		}else if(o1.b<o2.b){
			return -1;
		}else{
			return 0;
			
			
		}
		
		
	}
}
