#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<ctime>
using namespace std;
typedef unsigned long long ULL;
const int M=99999997;
const int MAXN=110000;
ULL Odd[MAXN],Even[MAXN];
int L,R;
int Main(){
freopen("yezi.in","r",stdin);
freopen("yezi.out","w",stdout);
scanf("%d%d",&L,&R);
int st=clock();
if(L&1) L++;
int Len=(R-L>>1)+10;
Even[0]=1;Even[1]=3;Odd[1]=1;
int od=1,ev=2;
for(int i=2;i<=Len;i++){
ev=(ev<<2)%M;Even[i]=(Even[i-1]+ev)%M;
od=(od<<2)%M;Odd[i]=(Odd[i-1]+od)%M;
}
ULL ans=0;
for(int i=L;i<=R;i++) if(i&1)
ans=(ans+((i%M)*Odd[i-L+1>>1])%M)%M;
else ans=(ans+((i%M)*Even[i-L>>1])%M)%M;
int en=clock();
// printf("%dms\n",en-st);
cout<<ans<<endl;
}
int main(){;}
int Avc=Main();
//Copyright@2017-2018Avicii,All rights reserved.