Fl.java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Fl {
static int max(int x, int y) {
return x > y ? x : y;
}
static int nsn(int a, int b) {
int res = max(a, b);
while (res <= a * b) {
if ((res % a == 0) && (res % b == 0)) {
break;
}
res++;
}
return res;
}
static int lotion(int n) {
int x, y, a, b, c, res, nsn;
x = n + 1;
res = 0;
while (x <= 2 * n) {
nsn = nsn(n, x);
//System.out.println(nsn);
a = nsn / n;
b = nsn / x;
c = a - b;
if ((nsn % b == 0) && (nsn % c == 0)) {
y = nsn / c;
//System.out.println(String.format("%d: {%d, %d}", n, x, y));
res++;
}
x++;
}
return res;
}
/**
* @param args
*/
while ((line = in.readLine()) != null && line.length() > 2) {
int n
= Integer.
parseInt(line.
substring(2));
System.
out.
println(lotion
(n
)); }
}
}