// Problem: GCD
// Contest: NowCoder
// URL: https://ac.nowcoder.com/acm/contest/35232/C
// Memory Limit: 1048576 MB
// Time Limit: 2000 ms
// Date: 2022-08-22 23:10:24
// --------by Herio--------
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int N=1e3+5,M=2e4+5,inf=0x3f3f3f3f,mod=1e9+7;
const int hashmod[4] = {402653189,805306457,1610612741,998244353};
#define mst(a,b) memset(a,b,sizeof a)
#define db double
#define PII pair<int,int>
#define PLL pair<ll,ll>
#define x first
#define y second
#define pb emplace_back
#define sz(a) (int)a.size()
#define all(a) a.begin(),a.end()
#define rep(i,a,b) for(int i=a;i<=b;++i)
#define per(i,a,b) for(int i=a;i>=b;--i)
#define IOS ios::sync_with_stdio(false),cin.tie(nullptr)
void Print(int *a,int n){
for(int i=1;i<n;i++)
printf("%d ",a[i]);
printf("%d\n",a[n]);
}
template <typename T> //x=max(x,y) x=min(x,y)
void cmx(T &x,T y){
if(x<y) x=y;
}
template <typename T>
void cmn(T &x,T y){
if(x>y) x=y;
}
int main(){
ll l,r,k;cin>>l>>r>>k;
ll s=0;
l--;
for(ll x=1,y;x<=r;x=y+1){
if(x<=l) y=min(r/(r/x),l/(l/x));
else y=r/(r/x);
if(r/x-l/x>=k) s+=(y-x+1);
}
cout<<s<<'\n';
return 0;
}