#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,m,n) for(int i=(m);i<(n);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
using ll = long long;
constexpr int INF = 0x3f3f3f3f;
constexpr long long LINF = 0x3f3f3f3f3f3f3f3fLL;
constexpr double EPS = 1e-8;
constexpr int MOD = 1000000007;
// constexpr int MOD = 998244353;
constexpr int dy[] = {1, 0, -1, 0}, dx[] = {0, -1, 0, 1};
constexpr int dy8[] = {1, 1, 0, -1, -1, -1, 0, 1}, dx8[] = {0, -1, -1, -1, 0, 1, 1, 1};
template <typename T, typename U> inline bool chmax(T &a, U b) { return a < b ? (a = b, true) : false; }
template <typename T, typename U> inline bool chmin(T &a, U b) { return a > b ? (a = b, true) : false; }
struct IOSetup {
  IOSetup() {
    std::cin.tie(nullptr);
    std::ios_base::sync_with_stdio(false);
    std::cout << fixed << setprecision(20);
  }
} iosetup;

std::vector<int> prime_sieve(int n, bool get_only_prime) {
  std::vector<int> prime, smallest_prime_factor(n + 1);
  std::iota(smallest_prime_factor.begin(), smallest_prime_factor.end(), 0);
  for (int i = 2; i <= n; ++i) {
    if (smallest_prime_factor[i] == i) prime.emplace_back(i);
    for (int p : prime) {
      if (i * p > n || p > smallest_prime_factor[i]) break;
      smallest_prime_factor[i * p] = p;
    }
  }
  return get_only_prime ? prime : smallest_prime_factor;
}

struct osa_k {
  std::vector<int> smallest_prime_factor;

  osa_k(int n = 10000000) : smallest_prime_factor(prime_sieve(n, false)) {}

  std::vector<std::pair<int, int>> query(int n) const {
    std::vector<std::pair<int, int>> res;
    while (n > 1) {
      int prime = smallest_prime_factor[n], exponent = 0;
      while (smallest_prime_factor[n] == prime) {
        ++exponent;
        n /= prime;
      }
      res.emplace_back(prime, exponent);
    }
    return res;
  }
};

constexpr int M = 1000000;
vector<int> factor[M + 1]{};

int main() {
  osa_k osa(M);
  for (int i = 1; i <= M; ++i) {
    for (auto [f, _] : osa.query(i)) factor[i].emplace_back(f);
  }
  map<pair<int, int>, ll> m;
  auto f = [&](int l, int r) -> ll {
    if (m.count({l, r}) == 1) return m[{l, r}];
    m[{l, r}] = 0;
    for (int i = l; i <= r; ++i) {
      REP(b, 1 << factor[i].size()) {
        int p = 1;
        REP(j, factor[i].size()) {
          if (b >> j & 1) p *= factor[i][j];
        }
        m[{l, r}] += (i / p - (l - 1) / p) * (__builtin_popcount(b) & 1 ? -1 : 1);
      }
    }
    return m[{l, r}];
  };
  int l, r; cin >> l >> r;
  ll ans = 0;
  for (int g = 2; r / g >= 2; ++g) {
    int x = max((l + g - 1) / g, 2), y = r / g;
    if (x <= y) ans += f(x, y);
  }
  cout << ans * 2 << '\n';
  return 0;
}

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
    int n,m;
    cin>>n>>m;
    string s;
    vector<pair<int,string>> vec;
    int i,j;
    for(i=0;i<m;i++){
        cin>>s;
        bool add=true;
        for(j=0;j<vec.size();j++){
            if(s.size()<=vec[j].second.size()){    
                if(vec[j].second.find(s)==std::string::npos) continue;
                (vec[j].first)++;
                add=false;
                break;
            }else{
                if(s.find(vec[j].second)==std::string::npos) continue;
                (vec[j].first)++;
                vec[j].second=s;
                add=false;
                break;
            }
        }
        if(add){
            vec.push_back({0,s});
        }
    }
    sort(vec.begin(),vec.end());
    string ans[20];
    for(i=vec.size()-1;i>=0; i--){
        int len=vec[i].second.size();
        for(j=0;j<20;j++){
            if(ans[j].size()+len<=20){
                ans[j]+=vec[i].second;
                break;
            }
        }
    }
    for(i=0;i<20;i++){
        for(j=ans[i].size();j<20;j++){
            ans[i]+='.';
        }
        cout<<ans[i]<<endl;
    }
    return 0;
}
