#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 100500;
const int maxn = 3000000;
const int sz = 8388608;
int fl = 0;
int ht[sz];
char val[sz];
inline int mhash(int x) { return ((x * 10099) ^ (x << 5)) & (sz - 1); }
void init() {
  for (int i = 0; i < (int)(sz); i++) ht[i] = -1;
}
inline char &get(int x) {
  int i = mhash(x);
  while (ht[i] != -1 && ht[i] != x) i = (i + 1) % sz;
  fl += ht[i] == -1;
  ht[i] = x;
  return val[i];
}
int bufa[maxn * 2], bufb[maxn * 2];
int *cura = bufa, *nxta = bufa + maxn;
int *curb = bufb, *nxtb = bufb + maxn;
int curc = 0, nxtc = 0;
void iterate() {
  nxtc = 0;
  for (int i = 0; i < (int)(curc); i++) {
    int a = cura[i];
    int b = curb[i];
    char &t = get(a);
    if (t < b + 1) {
      t = b + 1;
      if ((long long)a * (b + 1) <= 1000000000) {
        nxta[nxtc] = a;
        nxtb[nxtc++] = b + 1;
      }
    }
    if (a < 10000000 || (long long)a * b <= 1000000000) {
      char &t = get(a * b);
      if (t < b) {
        t = b;
        nxta[nxtc] = a * b;
        nxtb[nxtc++] = b;
      }
    }
  }
  swap(curc, nxtc);
  swap(cura, nxta);
  swap(curb, nxtb);
}
int main() {
  init();
  curc = 1;
  cura[0] = 1;
  curb[0] = 0;
  int l, r, p;
  cin >> l >> r >> p;
  for (int i = 0; i < (int)(p); i++) iterate();
  int s = 0;
  for (int i = 0; i < (int)(sz); i++)
    if (ht[i] >= l && ht[i] <= r) ++s;
  cout << s << endl;
  return 0;
}
