1. 


/* Angewandte Mathematik, SS09, IFB 2C
* ACM Problem #10862 (Connect the Cable Wires)
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=20&page=show_problem&problem=1803
*
* @author Dennis Wilfert
* @author Johann Studt
* @version 1.0, 05/21/2009
*
* Status : Accepted
* Runtime: 0.172
*/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;

public class Main {

public static void main(String[] args) throws NumberFormatException, IOException {

BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

// StringBuilder für die Ausgabe
StringBuilder output = new StringBuilder();

// Eingelesene Zahl
int number;

while(true){

// Zahl einlesen
number = Integer.parseInt(reader.readLine());

// Ist die Zahl 0, dann beenden
if(number==0)break;

// Anzahl der Möglichen Kombinationen ist die Fibonacci-Zahl von number+number
output.append(fibonacci(number+number));
output.append("\n");

}
System.out.print(output);
}

static BigInteger current;
static BigInteger previous;
static BigInteger result;
// Fibonacci-Folge berechnen
private static BigInteger fibonacci(int n) {

current = BigInteger.ONE;
previous = BigInteger.ZERO;
result = null;
for (int i = 2; i <= n; i++) {
result = current.add(previous);
previous = current;
current = result;
}
return result;
}

}