1.

/**
* Angewandte Mathematik, SS09, IFB 2C
* ACM Problem #10519 (!! Really Strange !!)
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=17&page=show_problem&problem=1460
*
* @author Christian Posselt
* @author Jonathan Schubert
* @version 1.0, 05/22/2009
*
* Status : Accepted
* Runtime: 0.084
*/

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;

class Main
{
static final BigInteger TWO = new BigInteger("2");

public static void main(String[] args) throws IOException
{
//set up all variables needed
StringBuilder bu = new StringBuilder();
BufferedReader Reader = new BufferedReader(new InputStreamReader(System.in));
BigInteger houses;

while(true)
{

String line = Reader.readLine();

if(line == null)
break;

//read-in amount of houses
houses = new BigInteger(line);

//append
bu.append(calculation(houses).toString() + "\n");
}

//print result
System.out.print(bu.toString());
}

/**
* calculation
*
* Calculates the amount of regions according to the rules.
*
* @param n: BigInteger representing the number of houses
* @return BigInteger representing the amount of regions
*/
public static BigInteger calculation(BigInteger n)
{
if(n.compareTo(BigInteger.ZERO)==0)
return BigInteger.ONE;

//formula: f(n)=n*n-n+2
return n.multiply(n).subtract(n).add(TWO);
}

}