/*
 * if you are interested in the reference code here,
 * see https://github.com/georeth/OJLIBS for more information
 *
 * Solution Author : Georeth Chow <georeth2010@gmail.com>
 */
#include <cstdio>
#include <cmath>
#include <climits>      // INT_MIN LLONG_MIN
#include <cfloat>       // DBL_MIN DBL_MAX
#include <cstring>      // memset
#include <cstdlib>      // malloc
#include <cstdint>      // int64_t
#include <cinttypes>    // PRId64 SCNd64
#include <ctime>        // clock
#include <cassert>      // assert
#include <limits>       // numeric_limits
#include <vector>
#include <deque>
#include <map>
#include <set>
#include <tuple>        // pair, tuple
#include <iostream>     // be careful.
#include <sstream>
#include <algorithm>
using namespace std;    // use as solution header. name polution is fine.
#ifdef LOCAL_JUDGE
#  define pr_debug(...) fprintf(stderr, __VA_ARGS__)
#  define pr_line() fprintf(stderr, "%s: %d\n", __FILE__, __LINE__)
#else
#  define pr_debug(...)
#  define pr_line()
#endif
template <typename T>
bool chmax(T &m, const T &v) { if (v > m) return m = v, true; return false; }
template <typename T>
bool chmin(T &m, const T &v) { if (v < m) return m = v, true; return false; }
template <typename T>
bool chinc(T &v1, T &v2) { if (v1 > v2) return swap(v1, v2), true; return false; }
template <typename T>
bool chdec(T &v1, T &v2) { if (v1 < v2) return swap(v1, v2), true; return false; }
#define ALL(x) begin(x), end(x)
#define FOR0(i,n) for(int i=0,i##end=n;i<i##end;i++)
#define FOR1(i,n) for(int i=1,i##end=n;i<=i##end;i++)
#define FOR(i,a,b) for(int i=a,i##end=b;i<=i##end;i++)
#define FOD0(i,n) for(int i=(n)-1;~i;i--)
#define FOD1(i,n) for(int i=n;i;i--)
#define FOD(i,a,b) for(int i=a,i##end=b;i>=i##end;i--)
#define FORE(i,x)for(__typeof(x.end())i=x.begin();i!=x.end();++i)
typedef int64_t ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pair<int, int>> vii;
typedef vector<vector<int>> vvi;
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#include <iostream>
namespace fio {
static const char eof = '\xff';
#define LL long long
#define I inline
#define OP operator
#define RT return*this;
#define ALL_INT(mcr) mcr(int)mcr(long)mcr(LL)mcr(unsigned)mcr(unsigned long)mcr(unsigned LL)
#define ALL_FLT(mcr) mcr(float)mcr(double)mcr(long double)
#define S2D x=0;int c=P();while((c<'0'||c>'9')&&c!='-')c=P();bool h=false;if(c=='-')h=true,c=P()
#define R2D for(;c>='0'&&c<='9';c=P())x=x*10+c-'0'
#define R2F if(c=='.'){double u=0.1;for(c=P();c>='0'&&c<='9';c=P(),u*=0.1)x+=u*(c-'0');}
#define RD_INT(Int) I Fr&OP,(Int&x){S2D;R2D;if(h)x=-x;RT}
#define RD_FLT(Flt) I Fr&OP,(Flt&x){S2D;R2D;R2F;if(h)x=-x;RT}
struct Cg{I char OP()(){char c=(char)getchar();if(c == eof)valid=false;return c;};bool valid=true;};
struct Cp{I void OP()(int x){putchar(x);}};
struct Ce{I void OP()(int x){putc(x,stderr);}};
I bool IS(char x){return x==' '||x=='\r'||x=='\n'||x=='\t';}
template<class T>struct Fr{T P;ALL_INT(RD_INT)ALL_FLT(RD_FLT)I Fr&OP,(char&x){for(x=P();IS(x);)x=P();RT}
I Fr&OP,(char*s){for(*s=P();IS(*s)&&P.valid;)*s=P();for(;!IS(*s)&&P.valid;)*++s=P();*s=0;RT}
I Fr&OP,(string &s){s.clear();char c=P();for(;IS(c)&&P.valid;)c=P();for(;!IS(c)&&P.valid;)s.push_back(c),c=P();RT}
I OP bool() { return P.valid; }
};
#define W4D if(x){if(x<0)P('-'),x=-x;int p=0;while(x)B[p++]=x%10+'0',x/=10;while(p--)P(B[p]);}else P('0')
#define WR_INT(Int) I Fw&OP,(Int x){W4D;RT}
#define WR_FLT(Flt) I Fw&OP()(Flt g,int d){if(d){double t=0.5;for(int i=d;i--;)t*=0.1;if(g<0)P('-'),g=-g;g+=t;*this,(LL)(g);P('.');g-=floor(g);while(d--){g*=10;int i=(int)floor(g);P(i+'0');g-=i;}}else*this,(g>0?(LL)(g+0.5):(LL)(g-0.5));RT}
template<class T>struct Fw{T P;char B[32];ALL_INT(WR_INT)ALL_FLT(WR_FLT)I Fw&OP,(char x){P(x);RT}typedef char_traits<char>CT;typedef basic_ostream<char,CT>&OS;typedef basic_istream<char,CT>&IS;I Fw&OP,(OS&(*func)(OS)){if(func==static_cast<OS&(*)(OS)>(endl<char,CT>))P('\n');RT}I Fw&OP,(IS&(*func)(IS)){if(func==static_cast<IS&(*)(IS)>(ws<char,CT>))P(' ');RT}
I Fw&OP,(const char*s){for(;*s;++s)P(*s);RT}
I Fw&OP,(const string&s){(*this),s.c_str();RT}
template<class C>I Fw&all(const C &v, char sep=' ', char nl='\n'){auto it=v.begin();for(int i=0;i<(int)v.size();++i,++it){if(i&&sep)P(sep);(*this),*it;}if(nl)P(nl);RT}
template<class U>I Fw&print(U x){(*this),x;P('\n');RT}
template<class U,class...Us>I Fw&print(U x,Us...args){(*this),x;P(' ');print(args...);RT}
};
#undef LL
#undef I
#undef OP
#undef RT
#undef ALL_INT
#undef ALL_FLT
#undef S2D
#undef R2D
#undef R2F
#undef RD_INT
#undef RD_FLT
#undef W4D
#undef WR_INT
#undef WR_FLT
}
fio::Fr<fio::Cg>fin;
fio::Fw<fio::Cp>fout;
fio::Fw<fio::Ce>ferr;
#include <limits>
#include <cstdint>
#include <type_traits>
#ifndef OJLIBS_USE_INT128
#  define OJLIBS_USE_INT128 1
#endif
template <typename Int>
Int gcd(Int a, Int b) {
    while (a != 0) {
        b %= a;
        if (b == 0)
            return a;
        a %= b;
    }
    return b;
}
template <typename Int, typename RInt = Int>
Int lcm(Int a, Int b) {
    return a / gcd(a, b) * static_cast<RInt>(b);
}
template <typename Int, typename XInt>
Int extended_gcd(Int a, Int b, XInt &x, XInt &y) {
    static_assert(std::numeric_limits<XInt>::is_signed,
            "x, y must be signed");
    if (b == 0) {
        x = 1;
        y = 0;
        return a;
    }
    /**
     * r = a - b * q
     * b * k1 + r * k2 = g
     * => a * k2 + b * (k1 - q * k2)
     *                 x = k2
     *                 y = k1 - q * k2 = k1 - q * x
     */
    Int g = extended_gcd(b, a % b, y, x);
    y -= (a / b) * x;
    return g;
}
template <typename Int>
Int mul_mod(Int a, Int b, Int m) {
    typedef int64_t TInt;
    static_assert(2 * std::numeric_limits<Int>::digits <= std::numeric_limits<TInt>::digits,
            "multiplication will overflow!");
    TInt p = a;
    p = (p * b) % m;
    return (Int)p;
}
#if defined(__SIZEOF_INT128__) && OJLIBS_USE_INT128
template <>
int64_t mul_mod<int64_t>(int64_t a, int64_t b, int64_t m) {
    __int128_t p = __int128_t(a) * b;
    return (int64_t)(p % m);
}
#else
template <>
int64_t mul_mod<int64_t>(int64_t a, int64_t b, int64_t m) {
    int64_t r = 0;
    for (int i = 63; i >= 0; --i) {
        r = (r + r) % m;
        if ((b >> i) & 1)
            r = (r + a) % m;
    }
    return r;
}
#endif
template <typename Int, typename PInt>
Int pow_mod(Int a, PInt p, Int m) {
    Int r;
    a %= m;
    for (r = 1; p; p >>= 1) {
        if (p & 1) r = mul_mod(r, a, m);
        a = mul_mod(a, a, m);
    }
    return r;
}
template <typename Int,
          typename XInt = typename std::make_signed<Int>::type>
Int inv_mod(Int a, Int m) {
    XInt x, y;
    extended_gcd(a, m, x, y);
    if (x < 0)
        return x + m;
    return x;
}
template <typename Int>
Int addx_mod(Int u, Int v, Int m) {
    Int r = u + v;
    if (r >= m) r -= m;
    return r;
}
template <typename Int>
Int subx_mod(Int u, Int v, Int m) {
    Int r = u - v;
    if (r < 0) r += m;
    return r;
}
template <typename Int>
Int div_mod(Int u, Int v, Int m) {
    Int g = gcd(v, m);
    assert(u % g == 0);
    Int mm = m / g;
    return mul_mod(u / g, inv_mod(v / g, mm), mm);
}
template <typename Int>
Int div_pos_r(Int a, Int b, Int &r) {
    Int q = a / b;
    r = a % b;
    if (r < 0) {
        if (b < 0)
            q += 1, r -= b;
        else
            q -= 1, r += b;
    }
    return q;
}
template <typename Int>
Int coprime_div(Int a, Int b) {
    while (b != 1) {
        while (a % b == 0) a /= b;
        b = gcd(a, b);
    }
    return a;
}
#define INV_MOD(x)      inv_mod((x), MOD)
#define MUL_MOD(x, y)   mul_mod((x), (y), MOD)
#define DIV_MOD(x, y)   div_mod((x), (y), MOD)
#define MULM_MOD(x, y)  (x) = mul_mod((x), (y), MOD)
#define DIVM_MOD(x, y)  (x) = div_mod((x), (y), MOD)
#define POW_MOD(x, y)   pow_mod((x), (y), MOD)
#define ADDX_MOD(x, y)  addx_mod((x), (y), MOD)
#define ADDM_MOD(x, y)  (x) = addx_mod((x), (y), MOD)
#define SUBX_MOD(x, y)  subx_mod((x), (y), MOD)
#define SUBM_MOD(x, y)  (x) = subx_mod((x), (y), MOD)
template <typename T>
struct binary_plus {
    T identity() const { return T(); }
    T operator()(const T &t1, const T &t2) const { return t1 + t2; }
    T negate(const T &t) { return -t; }
};
template <typename T, T MOD>
struct modular_plus {
    T identity() const { return T(); }
    T operator()(const T &t1, const T &t2) const { return (t1 + t2) % MOD; }
    T negate(const T &t) { return (MOD - t) % MOD; }
};
template <typename T, T MOD, typename TT = int64_t>
struct modular_times {
    T identity() const { return 1; }
    T operator()(const T &t1, const T &t2) const { return mul_mod(t1, t2, MOD); }
    T negate(const T &t) { return inv_mod(t, MOD); }
};
template <typename T>
struct binary_xor {
    T identity() const { return T(); }
    T operator()(const T &t1, const T &t2) const { return t1 ^ t2; }
    T negate(const T &t) { return t; }
};
template <typename T>
struct binary_max {
    T identity() const { return std::numeric_limits<T>::min(); }
    T operator()(const T &t1, const T &t2) const { return std::max(t1, t2); }
};
template <typename T>
struct binary_min {
    T identity() const { return std::numeric_limits<T>::max(); }
    T operator()(const T &t1, const T &t2) const { return std::min(t1, t2); }
};
template <typename Int, typename Op = binary_plus<Int>>
std::vector<Int> mobius_transform(const std::vector<Int> &f, Op op = Op()) {
    std::vector<Int> g = f;
    int n = (int)f.size() - 1;
    for (int i = n; i >= 1; --i)
        for (int j = i + i; j <= n; j += i)
            g[j] = op(g[j], g[i]);
    return g;
}
std::vector<int> mobius_function(int n) {
    std::vector<int> mobius(n + 1, 0);
    mobius[1] = 1;
    for (int i = 1; i <= n; ++i)
        if (mobius[i])
            for (int j = i + i; j <= n; j += i)
                mobius[j] -= mobius[i];
    return mobius;
}
template <typename Int, typename Op = binary_plus<Int>>
std::vector<Int> mobius_inverse(const std::vector<Int> &g, Op op = Op()) {
    std::vector<Int> f = g;
    int n = (int)g.size() - 1;
    for (int i = 1; i <= n; ++i)
        for (int j = i + i; j <= n; j += i)
            f[j] = op(f[j], op.negate(f[i]));
    return f;
}
#include <utility>
struct prime_list {
    prime_list(int n) {
        size = std::max(n, 2);
        prime_factor.resize(size);
        for (int p = 2; p < size; ++p) if (!prime_factor[p]) {
            primes.push_back(p);
            for (int pp = p; pp < size; pp += p)
                prime_factor[pp] = p;
        }
    }
    bool is_prime(int n) {
        return n > 1 && prime_factor[n] == n;
    }
    int least_prime_factor(int n) {
        return prime_factor[n];
    }
    int size;
    std::vector<int> prime_factor; // least prime factor, support O(number of prime factor) factorize.
    std::vector<int> primes;
};
using prime_factor_t = std::vector<std::pair<int64_t, int>>; // prime, multiplicity
template <typename Int>
prime_factor_t factorize(Int x) {
    prime_factor_t ret;
    if (x <= 1) return ret;
    for (int p = 2; Int(p) * p <= x; ++p) {
        int m = 0;
        while (x % p == 0) ++m, x /= p;
        if (m) ret.push_back(std::make_pair(p, m));
    }
    if (x > 1) 
        ret.push_back(std::make_pair(x, 1)); // x may larger than INT_MAX
    return ret;
}
template <typename Int>
bool is_prime_slow(Int x) {
    if (x <= 1) return false;
    for (Int p = 2; p * p <= x; ++p) {
        while (x % p == 0) return false;
    }
    return true;
}
template <typename Int>
prime_factor_t factorize(Int x, const prime_list &plist) {
    prime_factor_t ret;
    if (x <= 1) return ret;
    for (int p : plist.primes) {
        if (x < Int(p) * p) break;
        int m = 0;
        while (x % p == 0) ++m, x /= p;
        if (m) ret.push_back(std::make_pair(p, m));
    }
    if (x > 1) 
        ret.push_back(std::make_pair(x, 1));
    return ret;
}
/*
strong probable-prime base
32bit: 2, 7, 61
64bit: 2, 325, 9375, 28178, 450775, 9780504, 1795265022
*/
template <typename Int> struct SPRP;
template <> struct SPRP<int> { std::vector<int> bases = {2, 7, 61}; };
template <> struct SPRP<int64_t> { std::vector<int64_t> bases = {
    2, 325, 9375, 28178, 450775, 9780504, 1795265022}; };
template <typename Int>
bool is_prime(Int n) {
    if (n <= 3) {
        if (n <= 1) return false;
        return true;
    }
    if (n % 2 == 0) return false;
    Int d = n - 1;
    int s = 0;
    while (d % 2 == 0)
        d /= 2, ++s;
    for (Int b : SPRP<Int>().bases) {
        Int x = pow_mod(b, d, n);
        if (x == 0 || x == 1 || x == n - 1)
            continue;
        bool found = false;
        for (int i = 0; i < s - 1; ++i) {
            x = mul_mod(x, x, n);
            if (x == 1) return false;
            if (x == n - 1) {
                found = true;
                break;
            }
        }
        if (!found) return false;
    }
    return true;
}
/* =====  SOLUTION START  ===== */
constexpr int maxn = 1000006;
prime_list PL(maxn + 1000);
int main() {
    vector<int> divisors(maxn);
    divisors[1] = 1;
    for (int i = 2; i < maxn; ++i) {
        int p = PL.least_prime_factor(i);
        int cnt = 1;
        int ii = i / p;
        while (ii % p == 0) {
            ii /= p;
            ++cnt;
        }
        divisors[i] = divisors[ii] * (cnt + 1);
    }
    int64_t ans = 0;
    int n; fin, n;
    FOR(i, 1, n - 1) {
        ans += divisors[i];
    }
    fout, ans, endl;
    return 0;
}


Measured memory_bytes: 11000