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.util.*;
import java.io.*;
/*
 * Priority queue is an ADT.
 * Operation - Insert data based on the key.
 * Operation - Delete the min or max element.
 * Operation - Get the min or max element.s
 * 10
 * 10 4 8 9 123 56 3 9 56 1
 */
public class PQ {
	
	static InputReader in=new InputReader(System.in);
	static PrintWriter out=new PrintWriter(System.out);
	public static void main(String args[])
	{
		long n=in.readLong();
		out.println((n-2)*(n-2));
		out.flush();
		out.close();
	}
	public static <T> Set<Set<T>> powerSet(Set<T> originalSet) {
		Set<Set<T>> sets = new HashSet<Set<T>>();
		if (originalSet.isEmpty()) {
			sets.add(new HashSet<T>());
			return sets;
		}
		List<T> list = new ArrayList<T>(originalSet);
		T head = list.get(0);
		Set<T> rest = new HashSet<T>(list.subList(1, list.size())); 
		for (Set<T> set : powerSet(rest)) {
			Set<T> newSet = new HashSet<T>();
			newSet.add(head);
			newSet.addAll(set);
			sets.add(newSet);
			sets.add(set);
		}		
		return sets;
	}
}
/*class Max_PQ{
	   int size=0;
	   int pq[];
	   int capacity = 0;
	   int min_val = -1;
	   public Max_PQ(int capacity,int min_val){
		   this.capacity = capacity;
		   pq=new int[capacity+1];
		   this.min_val = min_val;
		   Arrays.fill(pq,min_val);
	   }
	   public void heapify(int parent){
		 if(parent<=size/2){
			 int max = parent;
			 if((2*parent+1)<size&&pq[2*parent+1]!=min_val&&pq[parent]<pq[2*parent+1])
				 max=2*parent+1;
			 if((2*parent+2)<size&&pq[2*parent+2]!=min_val&&pq[max]<pq[2*parent+2])
				 max=2*parent+2;
//				 System.out.println(max+" "+pq[2*parent+1]+" "+pq[2*parent+2]);
			 if(max!=parent){
				 int temp=pq[max];
				 pq[max]=pq[parent];
				 pq[parent]=temp;
				 heapify(max);
			 } 
		 }
	   }
	   public void insert(int data){
		   int i=size;
		   size++;
		   while(i>0&&data>pq[(i-1)/2]){
			   pq[i]=pq[(i-1)/2];
			   i=(i-1)/2;
		   }  
		   pq[i]=data; 
	   }
	   public void delete(){
		   if(size == 0){
			   System.out.println("No element");
		   }
		   else{
			   pq[0]=pq[size-1];
			   size--;
			   heapify(0);
		   }
	   }
	   public void delete(int data,int parent){
		  if(parent<size){
			  if(pq[parent]==data){
				  pq[parent]=pq[size-1];
				  size--;
				  heapify(parent);
			  }
			  else{
				  delete(data,2*parent+1);
				  delete(data,2*parent+2);
			  }  
		  }
	   }
	   public int getMax(){
		   if(size==0){
			   return -1;
		   }
		   else{
			   return pq[0];
		   }
	   }
	   public int getAndDelMax(){
		   if(size == 0){
			   return -1;
		   }
		   else{
			   int ans = getMax();
			   delete(ans,0);
			   return ans;
		   }
	   }
	   public void display(){
		   //System.out.println(count);
		   for(int i=0;i<size;i++){
			   System.out.print(pq[i]+" ");
		   }
		   System.out.println();
	   }
	}
class Min_PQ{
	   int size=0;
	   int pq[];
	   int capacity = 0;
	   int min_val = -1;
	   public Min_PQ(int capacity,int min_val){
		   this.capacity = capacity;
		   pq=new int[capacity+1];
		   this.min_val = min_val;
		   Arrays.fill(pq,min_val);
	   }
	   public void heapify(int parent){
		 if(parent<=size/2){
			 int max = parent;
			 if((2*parent+1)<size&&pq[2*parent+1]!=min_val&&pq[parent]>pq[2*parent+1])
				 max=2*parent+1;
			 if((2*parent+2)<size&&pq[2*parent+2]!=min_val&&pq[max]>pq[2*parent+2])
				 max=2*parent+2;
//				 System.out.println(max+" "+pq[2*parent+1]+" "+pq[2*parent+2]);
			 if(max!=parent){
				 int temp=pq[max];
				 pq[max]=pq[parent];
				 pq[parent]=temp;
				 heapify(max);
			 } 
		 }
	   }
	   public void insert(int data){
		   int i=size;
		   size++;
		   while(i>0&&data<pq[(i-1)/2]){
			   pq[i]=pq[(i-1)/2];
			   i=(i-1)/2;
		   }  
		   pq[i]=data; 
	   }
	   public void delete(){
		   if(size == 0){
			   System.out.println("No element");
		   }
		   else{
			   pq[0]=pq[size-1];
			   size--;
			   heapify(0);
		   }
	   }
	   public void delete(int data,int parent){
		  if(parent<size){
			  if(pq[parent]==data){
				  pq[parent]=pq[size-1];
				  size--;
				  heapify(parent);
			  }
			  else{
				  delete(data,2*parent+1);
				  delete(data,2*parent+2);
			  }  
		  }
	   }
	   public int getMin(){
		   if(size==0){
			   return -1;
		   }
		   else{
			   return pq[0];
		   }
	   }
	   public int getAndDelMin(){
		   if(size == 0){
			   return -1;
		   }
		   else{
			   int ans = getMin();
			   delete(ans,0);
			   return ans;
		   }
	   }
	   public void display(){
		   //System.out.println(count);
		   for(int i=0;i<size;i++){
			   System.out.print(pq[i]+" ");
		   }
		   System.out.println();
	   }
	}
class CustomOperations{	
	public static ArrayList<Long> sieve(long n)
  {
  	int i,j;
  	ArrayList<Long> list=new ArrayList<Long>();
  	int n_n=(int)Math.sqrt(n);
  	boolean tp[]=new boolean[100000001];
  	tp[0]=tp[1]=true;
  	for(i=2;i<=n_n;i++)
  	{
  		if(!tp[i])
  		for(j=2*i;j<=n;j+=i)
  		{
  			tp[j]=true;
  		}
  	}
  	for(j=2;j<=n;j++)
  	  if(!tp[j])
  		list.add((long)j);
  	return list;
  }
	public static ArrayList<Integer> sieve(int n)
  {
  	int i,j;
  	ArrayList<Integer> list=new ArrayList<Integer>();
  	int n_n=(int)Math.sqrt(n);
  	boolean tp[]=new boolean[n+1];
  	tp[0]=tp[1]=true;
  	for(i=2;i<=n_n;i++)
  	{
  		if(!tp[i])
  		for(j=2*i;j<=n;j+=i)
  		{
  			tp[j]=true;
  		}
  	}
  	for(j=2;j<=n;j++)
  	  if(!tp[j])
  		list.add(j);
  	return list;
  }
	public static boolean[] sieve1(int n)
  {
  	int i,j;
  	int n_n=(int)Math.sqrt(n);
  	boolean tp[]=new boolean[n+1];
  	tp[0]=tp[1]=true;
  	for(i=2;i<=n_n;i++)
  	{
  		if(!tp[i])
  		for(j=2*i;j<=n;j+=i)
  		{
  			tp[j]=true;
  		}
  	}
  	return tp;
  }
  public static ArrayList<Long> segmented_sieve(long m,long n)
  {
  	long tp,lb,ub,j;
  	long n_n=(long)Math.sqrt(n);
  	ArrayList<Long> ans=sieve(n_n);
  	if(n_n<m)
  		lb=m;
  	else
  		lb=n_n+1;
  	ub=lb+n_n;
  	ArrayList<Long> ans1=new ArrayList<Long>();
  	while(ub<=n)
  	{
  		boolean mark[]=new boolean[(int)(ub-lb+2)];
  		for(long i:ans)
  		{
  			tp=(long)Math.ceil((double)lb/i)*i;
  			for(j=tp;j<=ub;j+=i)
  				mark[(int)(j-lb)]=true;
  		}
  		for(j=lb;j<=ub;j++)
  			if(!mark[(int)(j-lb)])
  				ans.add(j);
  		lb=ub+1;
  		ub=lb+n_n;
  		if(lb>n)
  			break;
  		if(ub>=n)
  			ub=n;
  	}
  	for(long i:ans)
  		if(i>=m&&i<=n)
  			ans1.add(i);
  	return ans1;
  }
	public static long[] divisors(long m,long n)
	{
		ArrayList<Integer> ans=sieve((int)Math.sqrt(n));
  	boolean check[]=sieve1(10000);
		long mark[]=new long[(int)(n-m+1)];
		for(long i=m;i<=n;i++)
			mark[(int)(i-m)]=i;
		long div[]=new long[(int)(n-m+1)];
		Arrays.fill(div,1);
		for(long i:ans)
		{
			for(long j=(long)Math.ceil((double)m/i)*i;j<=n;j+=i)
			{
				long tp=mark[(int)(j-m)];
				int ct=0;
				while(tp%i==0)
				{
					ct++;
					tp/=i;
				}
				div[(int)(j-m)]*=ct+1;
				mark[(int)(j-m)]=tp;
			}
		}
		return div;
	}
	public static int lowerBound(int a[],int x,int n)
	{
		    int l = 0;
		    int h = n;
		    while (l < h) {
		        int mid = (l + h) / 2;
		        if (x <= a[mid]) {
		            h = mid;
		        } else {
		            l = mid + 1;
		        }
		    }
		    return l;
	}
	public static int upperBound(int a[],int x,int n)
	{
		int l = 0;
	    int h = n; 
	    while (l < h) {
	        int mid = (l + h) / 2;
	        if (x >= a[mid]) {
	            l = mid + 1;
	        } else {
	            h = mid;
	        }
	    }
	    return l;
	}
}*/
class InputReader{
	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;
	
	public InputReader(InputStream stream){this.stream = stream;}
	public 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++];
	}

	public int readInt(){
		int c = read();
		while(isSpaceChar(c)) c = read();
		int sgn = 1;
		if (c == '-') {sgn = -1;c = read();}
		int res = 0;
		do {
			if(c<'0'||c>'9') throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		}
		while (!isSpaceChar(c)); return res * sgn;
	}
	
	public long readLong() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
      }
		long res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
      }
		while (!isSpaceChar(c));
          return res * sgn;
  }
	
	public double readDouble() {
      int c = read();
      while (isSpaceChar(c))
          c = read();
      int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
      }
		double res = 0;
		while (!isSpaceChar(c) && c != '.') {
			if (c == 'e' || c == 'E')
				return res * Math.pow(10, readInt());
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
      }
		if (c == '.') {
			c = read();
			double m = 1;
			while (!isSpaceChar(c)) {
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, readInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				m /= 10;
				res += (c - '0') * m;
				c = read();
          }
      }
		return res * sgn;
  }
	
	public String readString() {
		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 boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

	public String next() {
		return readString();
	}
	
	public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}

