#include <bits/stdc++.h>
int prs[105];
int prtot;
int l, r, p;
inline void pre() {
  int i, j;
  for (i = 2; i < p; i++) {
    for (j = 2; j < i; j++)
      if (i % j == 0) break;
    if (j == i) prs[++prtot] = i;
  };
};
int a[3000005];
int b[3000005];
int tot;
inline void dfs(int x, int i) {
  if (i > prtot) {
    a[++tot] = x;
    return;
  };
  dfs(x, i + 1);
  int p = prs[i++];
  while (1LL * x * p <= r) dfs(x *= p, i);
};
bool f[3000005];
int dp[3000005];
int main() {
  scanf("%d%d%d", &l, &r, &p);
  pre();
  dfs(1, 1);
  std::sort(a + 1, a + tot + 1);
  int i, j, t;
  for (i = 2; i <= tot; i++) dp[i] = 1000;
  for (i = 1; i < p; i++) {
    t = 1;
    for (j = 1; j <= tot; j++) {
      int tmp = a[j];
      if (1LL * tmp * i > r) break;
      tmp *= i;
      while (a[t] < tmp) ++t;
      if (a[t] == tmp && dp[t] > dp[j] + 1) {
        dp[t] = dp[j] + 1;
      };
    };
    for (j = 1; j <= tot; j++) f[j] |= dp[j] + i <= p;
  };
  int ans = 0;
  for (i = 1; i <= tot; i++) ans += f[i] && a[i] >= l && a[i] <= r;
  printf("%d\n", ans);
}
