package ch.usi.inf.sp.dbi;

public class Application {
    public static void main(String... args) {
        fib(20);
    }

    public static int fib(int n) {
        System.out.println("fib(" + n + ")");
        if (n == 0 || n == 1) {
            return n;
        } else {
            int i = fib(n-1) + fib(n-2);
            System.out.println("fib(" + n + ") = " + i);
            return i;
        }
    }
}
