#include "bits/stdc++.h"

using namespace std;

int main() {
    int a, b;

    cin >> a >> b;

    int c = 2 * a + 100;

    cout << ((c - b) > 0 ? c - b : 0) << endl;

    return 0;
}
#include <iostream>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <queue>
#include <map>
 
using namespace std;
typedef long long int ll;
typedef pair <int,int> pii;
typedef pair<ll,ll> pll;
 
 
/*bool compare_function(const pair<int, int> a, const pair<int, int> b)
{
    return a.first < b.first;
}*/
// use case
//sort(V.begin(), V.end(), compare_function);
 
/*struct compare
{
    bool operator ()(const pair<int, int> &a, const pair<int, int> &b) {
    if (a.second-a.first==b.second-b.first)
    {
        return a.first>b.first;
    }
    return a.second-a.first < b.second-b.first;}
};
priority_queue <pair<int,int>, vector <pair<int,int>>, compare> Q;*/
 
/*void print1(vector <int> X)
{
    for (int i=0; i<X.size(); i++)
    {
        cout<<X[i]<<" ";
    }
    cout<<endl;
    return;
}
 
void print2(vector <vector <int>> X)
{
    for (int i=0; i<X.size(); i++)
    {
    for (int j=0;j<X[i].size();j++) {
        cout<<X[i][j]<<" ";}
    cout<<endl;}
    return;
}*/

void solve(vector <ll> &A, ll a) {
	ll p=2;
	while (p*p<=a) {
		if (a%p==0) {
			if (a%(p*p)==0) {return;}
			A[a]=-A[a/p];
			return;
			}
		p++;
		}
	A[a]=1;
	return;
	}
 
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    ll l,r;
    cin>>l>>r;
    vector <ll> A(r+1,0);
    for (ll i=2;i<=r;i++) {
		solve(A,i);
		}
	ll ats=0;
	for (ll g=2;g<=r;g++) {
		ll k=r/g-(l-1)/g;
		ats+=A[g]*(k*(k-1))/2;
		//cout<<g<<" "<<k<<" "<<A[g]<<endl;
		}
	for (ll g=max(l,2LL);g<=r/2;g++) {
		ll k=r/g-(l-1)/g-1;
		ats-=k;
		}
	cout<<ats*2<<endl;
    return 0;
}
