#ifdef LOGX
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
using namespace std;
//#include <atcoder/all>
//using namespace atcoder;

/*---------macro---------*/
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep2(i, s, n) for (int i = s; i < (int)(n); ++i)
#define ALL(a) a.begin(),a.end()
#define RALL(a) a.rbegin(),a.rend()
#define mybit(i,j) (((i)>>(j))&1)

/*---------type/const---------*/
typedef long long ll;
typedef unsigned long long ull;
typedef std::string::const_iterator state; //構文解析
const ll big=1000000007;
//const ll big=998244353;
const double EPS=1e-8; //適宜変える
const int dx[4]={1,0,-1,0};
const int dy[4]={0,1,0,-1};
const char newl='\n';
struct{
    constexpr operator int(){return -int(1e9)-10;}
    constexpr operator ll(){return -ll(1e18)-10;}
}neginf;
struct{
    constexpr operator int(){return int(1e9)+10;}
    constexpr operator ll(){return ll(1e18)+10;}
    constexpr auto operator -(){return neginf;}
}inf;

/*---------debug---------*/
#ifdef LOGX
#include <template/debug.hpp>
#else
#define dbg(...) ;
#define dbgnewl ;
#define prt(x) ;
#define _prt(x) ;
#endif

/*---------function---------*/
template<typename T> T max(const std::vector<T> &a){T ans=a[0];for(T elem:a){ans=max(ans,elem);}return ans;}
template<typename T> T min(const std::vector<T> &a){T ans=a[0];for(T elem:a){ans=min(ans,elem);}return ans;}
template<typename T,typename U> bool chmin(T &a,const U b){if(a>b){a=b;return true;}return false;}
template<typename T,typename U> bool chmax(T &a,const U b){if(a<b){a=b;return true;}return false;}
bool valid(int i,int j,int h,int w){return (i>=0 && j>=0 && i<h && j<w);}
template<class T,class U>T expm(T x,U y,const ll mod=big){T res=1;while(y){if(y&1)(res*=x)%=mod;(x*=x)%=mod;y>>=1;}return res;}
template<class T,class U>T exp(T x,U y){T res=1;while(y){if(y&1)res*=x;x*=x;y>>=1;}return res;}

constexpr long long primetest[]={2,3,61};
constexpr long long primetest_big[]={2,325,9375,28178,450775,9780504,1795265022};
//O(N^(1/4))
//N>2^32では__int128_tが使える環境に限る
bool isprime(const long long x){
    if(x==0 || x==1)return false;
    const long long d=(x-1)/((x-1)&-(x-1));
    if(x<(1LL<<32)){
        if(x==2 || x==3 || x==61)return true;
        for(long long e:primetest){
            long long t=d;
            long long y=expm(e,t,x);
            if(y==1)continue;//とりあえずテスト通過.
            while(y!=x-1){//y=-1になったらその時点でテスト通過.
                y=(y*y)%x;//y=e^2t modx.
                if(y==1 || t==x-1)return false;//y==1:1の平方根に1,-1以外が存在.t==x-1:e^t!=1.
                t<<=1;
            }
        }
        return true;
    }
    else{
        for(__int128_t e:primetest_big){
            long long t=d;
            __int128_t y=expm(e,t,x);
            if(y==1)continue;//とりあえずテスト通過.
            while(y!=x-1){//y=-1になったらその時点でテスト通過.
                y=(y*y)%x;//y=e^2t modx.
                if(y==1 || t==x-1)return false;//y==1:1の平方根に1,-1以外が存在.t==x-1:e^t!=1.
                t<<=1;
            }
        }
        return true;
    }
}

int main(){
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    std::cout.precision(10);
    /*--------------------------------*/
    
    ll a,b;cin >> a >> b;
    vector<ll> ps;
    rep(i,b-a+1){
        if(isprime(i))ps.emplace_back(i);
    }
    vector<int> has;
    for(ll i=a;i<=b;i++){
        int now=0;
        rep(j,ps.size())if(i%ps[j] == 0)now|=1<<j;
        has.emplace_back(now);
    }
    vector<ll> dp(1<<ps.size());
    dp[0]=1;
    rep(i,b-a+1)for(int S=(1<<ps.size())-1;S>=0;S--){
        if((S&has[i]) == 0)dp[S|has[i]]+=dp[S];
    }
    ll ans=0;
    for(ll x:dp){
        ans+=x;
    }
    cout << ans << newl;
}
#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using ld = long double;

#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define ALL(x) ((x).begin()), ((x).end())

#define READ(x) (cin >> (x))
#define WRITE_N(x) (cout << (x) << endl)
#define WRITE(x) (cout << (x))
#define WRITE_YESNO(x) (WRITE_N((x) ? "Yes" : "No"))

#define PRECISE_COUT std::cout << std::setprecision(15) << std::fixed

bool xor_logic(bool x, bool y) { return (x && y) || (!x && !y); }

int main() {
  // get values from input
  cin.tie(0);
  ios::sync_with_stdio(false);

  int A, B;
  cin >> A >> B;

  // main procedure

  // output
  cout << 2 * A + 100 - B << endl;

  return 0;
}