#include <stdio.h> #include <set> using namespace std; void solve(int n){ set<int> checked; int p = 0, y = n + 1, max = 2000000000; bool first = true; while(y < max){ //printf("y %d\n", y); //printf("max %d\n", max); if(checked.count(y)){ y++; continue; } double d = (double)n * y / (y - n); int x = (int)d; checked.insert(x); if(x == d){ if(first){ max = x; first = false; } p++; } y++; } printf("%d\n", p); } int main(){ int a, n; char c; while(scanf("%d%c%d ", &a, &c, &n) == 3){ solve(n); } }