#include <bits/stdc++.h>
int main() {
  int a, b, c, sub = 0;
  int cnt = 0;
  scanf("%d %d %d", &a, &b, &c);
  if (a < b) {
    sub = a;
    a = b;
    b = sub;
  }
  if (c < a) {
    sub = c;
    c = a;
    a = sub;
  }
  if (a < b) {
    sub = a;
    a = b;
    b = sub;
  }
  for (a; a > b; a++) {
    if (c % a == 0) {
      cnt += 1;
    }
  }
  printf("%d\n", cnt);
  return 0;
}
