public class String {
}

public class Number {
    float f;
    boolean b;

    public Number(float x){
	f = x;
    }
}

public class Int extends Number {
    int n;

    public Int(int i){
	super(3.5);
	n = i;
    }
}

public class Fact extends Int {
    int m;

    public Fact(int i){
	super(i);
	m = 2;
    }

    public int f() {
	return m + fact(n);
    }

    int fact(int n) {
	return n > 2 ? n * fact(n -1) : n;
    }
}

public class Test {
    public void main(){
	int n, f;
	Fact t;
	n = 0;
	while(n < 1 || n > 16) { printf ("Enter an integer greater than 0 and less than 17: ");	
		    			 scanf ("%d", &n);
	}
	t = new Fact(n);
	f = t.f();	
	printf("2 + factorial(%d)= %d\n", n, f);
    } 
}
