#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
void sieve(int A[],bool B[],int n){
for(int i=0;i<=n;i++){
A[i]=i;
B[i]=true;
}
for(int i=2;i*i<=n;i++){
if(B[i])
for(int j=i*i;j<=n;j+=i){
B[j]=false;
A[j]=min(A[j],i);
}
}
}
vector<int> primefac(int n,int A[]){
vector<int>p;
while(n!=1){
p.push_back(A[n]);
n/=A[n];
}
return p;
}
int divisors( vector<int>p){
int s=0,e=1;
for(int i=0;i<p.size()-1;i++){
if(p[i]!=p[i+1]){
s+=2;
e*=s;
s=0;
}
else
s++;
}
s+=2;
e*=s;
return e;
}
int main(){
int a,b,n,s=0;
cin>>a>>b>>n;
int*A=new int[max(a,b)+1];
bool*B=new bool[max(a,b)+1];
sieve(A,B,max(a,b));
delete[]B;
for(int i=min(a,b);i<=max(a,b);i++){
if(i==1){
if(n==1)
s++;
}
else{
if(divisors(primefac(i,A))==n)
s++;
}}
delete[]A;
cout<<s;
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKdHlwZWRlZiBsb25nIGxvbmcgbGw7CnZvaWQgc2lldmUoaW50IEFbXSxib29sIEJbXSxpbnQgbil7CiAgICBmb3IoaW50IGk9MDtpPD1uO2krKyl7CiAgICAgICAgQVtpXT1pOwogICAgICAgIEJbaV09dHJ1ZTsKICAgIH0KICAgIGZvcihpbnQgaT0yO2kqaTw9bjtpKyspewogICAgICAgIGlmKEJbaV0pCiAgICAgICAgICAgIGZvcihpbnQgaj1pKmk7ajw9bjtqKz1pKXsKICAgICAgICAgICAgICAgIEJbal09ZmFsc2U7CiAgICAgICAgICAgICAgICBBW2pdPW1pbihBW2pdLGkpOwogICAgfQp9Cn0KdmVjdG9yPGludD4gcHJpbWVmYWMoaW50IG4saW50IEFbXSl7CiAgICB2ZWN0b3I8aW50PnA7CiAgICB3aGlsZShuIT0xKXsKICAgICAgICBwLnB1c2hfYmFjayhBW25dKTsKICAgICAgICBuLz1BW25dOwogICAgfQogICAgcmV0dXJuIHA7Cn0KaW50IGRpdmlzb3JzKCB2ZWN0b3I8aW50PnApewogICAgaW50IHM9MCxlPTE7CiAgICBmb3IoaW50IGk9MDtpPHAuc2l6ZSgpLTE7aSsrKXsKICAgICAgICBpZihwW2ldIT1wW2krMV0pewogICAgICAgICAgICBzKz0yOwogICAgICAgICAgICBlKj1zOwogICAgICAgICAgICBzPTA7CiAgICAgICAgfQogICAgICAgIGVsc2UKICAgICAgICAgICAgcysrOwogICAgfQogICAgcys9MjsKICAgIGUqPXM7CiAgICByZXR1cm4gZTsKfQoKaW50IG1haW4oKXsKICAgIGludCBhLGIsbixzPTA7CiAgICBjaW4+PmE+PmI+Pm47CiAgICBpbnQqQT1uZXcgaW50W21heChhLGIpKzFdOwogICAgYm9vbCpCPW5ldyBib29sW21heChhLGIpKzFdOwogICAgc2lldmUoQSxCLG1heChhLGIpKTsKICAgIGRlbGV0ZVtdQjsKICAgIGZvcihpbnQgaT1taW4oYSxiKTtpPD1tYXgoYSxiKTtpKyspewogICAgICAgIGlmKGk9PTEpewogICAgICAgICAgICBpZihuPT0xKQogICAgICAgICAgICAgICAgcysrOwogICAgICAgIH0KICAgICAgICBlbHNlewogICAgICAgICAgIGlmKGRpdmlzb3JzKHByaW1lZmFjKGksQSkpPT1uKQogICAgICAgICAgICAgICBzKys7CiAgICB9fQogICAgZGVsZXRlW11BOwogICAgY291dDw8czsKICAgIHJldHVybiAwOwoKCn0=