#include <bits/stdc++.h>
#define INF 100000000
#define MOD 1000000007
#define MAXN 100005
#define ins insert
#define pb push_back
#define mp make_pair
#define sz size
#define sd(n) scanf("%d",&n)
#define pdn(n) printf("%d\n",n)
#define pd(n) printf("%d ",n)
#define nl() printf("\n")
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef pair<int, int> pii;
vi primes;
bool check[MAXN];
int main() {
//clock_t start=clock();
for (int i = 3; i*i <= 31623; i += 2) {
if (!check[i]) {
for (int j = i*i; j <= 31623; j += i)
check[j] = true;
}
}
primes.pb(2);
for (int i = 3; i <= 31623; i += 2)
if (!check[i])
primes.pb(i);
int lim = primes.sz();
int a, b, n; sd(a), sd(b), sd(n);
int countt = 0; //final answer
for (int i = a; i <= b; ++i) {
int x = 1; //Count of divisors of i
int temp = i;
for (int j = 0; (primes[j]*primes[j] <= i) && (j < lim); ++j) {
if (!(temp % primes[j])) {
int cc = 0;
while (!(temp % primes[j])) {
temp /= primes[j];
cc++;
}
x *= (cc+1);
if (x > n)
break;
}
}
if (temp != 1)
x *= 2;
if (x == n)
++countt;
}
pdn(countt);
//clock_t stop=clock();
//double elapsed=(double)(stop-start) * 1000.0 / CLOCKS_PER_SEC;
//printf("Time elapsed in ms : %f",elapsed);
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CgojZGVmaW5lIElORiAxMDAwMDAwMDAKI2RlZmluZSBNT0QgMTAwMDAwMDAwNwojZGVmaW5lIE1BWE4gMTAwMDA1CiNkZWZpbmUgaW5zIGluc2VydAojZGVmaW5lIHBiIHB1c2hfYmFjawojZGVmaW5lIG1wIG1ha2VfcGFpcgojZGVmaW5lIHN6IHNpemUKI2RlZmluZSBzZChuKSBzY2FuZigiJWQiLCZuKQojZGVmaW5lIHBkbihuKSBwcmludGYoIiVkXG4iLG4pCiNkZWZpbmUgcGQobikgcHJpbnRmKCIlZCAiLG4pCiNkZWZpbmUgbmwoKSBwcmludGYo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