/**
 * @author Daniel "3ICE" Berezvai
 */
public class Fib {

	public static int fib(int n) {
		if(n == 0) return 0;
		else if(n == 1) return 1;
		else return fib(n - 1) + fib(n - 2);
	}

	public static void main(String[] args) {
		if(args.length!=1){
			System.out.println("Hello, please give me an integer as a command line argument.");
		}else{
			int a=Integer.parseInt(args[0]);
			if(a>0){
				System.out.println("The " + a + "th number in the Fibonacci sequence is " + fib(a));
			}else{
				System.out.println("Sorry, I don't know what to do with non-natural numbers. A sequence can only be indexed with 1, 2, 3...");
			}
		}
	}
}
