#include<fstream>
#include<cmath>
using namespace std;
unsigned long long y[100],p=(unsigned long long)(pow(2.0,63)-1),x[100];
//y,1
//x,lenth
unsigned long long dfs(unsigned long long a)
{
int i=0;
for(i=0;i<93;i++)
{
if(a==x[i-1])
{
return y[i-1];
}
if(x[i-1]>a)
break;
}
return dfs(x[i-1])-dfs(x[i-2]);
}
int main()
{
ifstream fin("infinit.in");
ofstream fout("infinit.out");
unsigned long long a,b;
int Q;
y[0]=1;
y[1]=1;
y[2]=2;
x[0]=1;
fin>>Q>>a>>b;
int i=2;
for(i=2;;i++)
{
y[i]=y[i-1]+y[i-2];
x[i-1]=y[i];
if(y[i]>p)
break;
}
for(int i=0;i<Q;i++)
{
fout<<dfs(b)-dfs(a-1);
}
return 0;
}