#define _USE_MATH_DEFIMES
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <clocale>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

const int MOD = 1'000'000'007;
const int MOD2 = 998'244'353;
const int INF = 1'000'000'000; //1e9
const int NIL = -1;
const long long LINF = 1'000'000'000'000'000'000; // 1e18
const long double EPS = 1E-10L;

template<class T, class S> inline bool chmax(T &a, const S &b){
    if(a < b){a = b; return true;}
    return false;
}
template<class T, class S> inline bool chmin(T &a, const S &b){
    if(b < a){a = b; return true;}
    return false;
}
template<class T, class S> inline bool exist(std::set<T> &s, const S &e){
    return (s.find(e) != std::end(s));
}










int main(){
    int L, R; std::cin >> L >> R;
    
    long long ans{};
    std::vector<long long> cnt(R+1, 0);
    for(int g{R}; g >= 2; --g){
        long long k{R/g - (L-1)/g}, c{k * k};
        for(int i{2*g}; i <= R; i += g){
            c -= cnt[i];
        }
        cnt[g] = c;
        if(std::max(2, L) <= g && g <= R){
            c -= 2 * k - 1;
        }
        ans += c;
    }
    std::cout << ans << std::endl;
    return 0;
}

#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <iomanip>
using namespace std;

int main(void){

  string str;
  int num;
  int i,j,k;
  int a,b;
  int ans=0;
  int flag =0;

  cin >> a >> b;

  for(;;){

      a = a-b;
      if(a < 0){
          break;
      }

      ans++;
  }

  cout << ans << endl;

  
  return 0;
}
