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