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