#include #include using namespace std; int main() { //freopen("mod.in","r",stdin); //freopen("mod.out","w",stdout); int a,b,c,cnt=0; scanf("%d %d %d",&a,&b,&c); if(((ab&&c>b))&&a!=c) return printf("INF"),0; for(int i=1;i<=max({a,b,c});i++) { int b1=a%i,b2=b%i,b3=c%i; if(((b1b2&&b3>b2))&&b1!=b3) cnt++; } printf("%d",cnt); return 0; }