#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(); //Sieve
for (int i = 2; i <= 31623; ++i) {
if (!check[i]) {
primes.pb(i);
for (int j = i+i; j <= 31623; j += i)
check[j] = true;
}
}
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;
/*vi::iterator it = lower_bound(primes.begin(), primes.end(), temp); //If the number is prime we know it has 2 divisors.
if (*it == temp) { //This makes it slower so I have commented this part.
x *= 2;
if (x == n)
++countt;
continue;
}*/
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+CgojZGVmaW5lIElORiAxMDAwMDAwMDAKI2RlZmluZSBNT0QgMTAwMDAwMDAwNwojZGVmaW5lIE1BWE4gMTAwMDA1CiNkZWZpbmUgaW5zIGluc2VydAojZGVmaW5lIHBiIHB1c2hfYmFjawojZGVmaW5lIG1wIG1ha2VfcGFpcgojZGVmaW5lIHN6IHNpemUKI2RlZmluZSBzZChuKSBzY2FuZigiJWQiLCZuKQojZGVmaW5lIHBkbihuKSBwcmludGYoIiVkXG4i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