#include <string>
#include <iostream>
#include <stack>
#include <queue> // priority_queue も入ってる
#include <set>   // 要素数は size() で取得 multisetもある
#include <map>
#include <array> // sizeはコンパイル時定数で固定
#include <vector>
#include <numeric>   // accumulate, gcd
#include <algorithm> // count_ifに必要
#include <iomanip>   // cout << setprecision(15) << x で小数の出力精度を指定
#include <tuple>
#include <utility> //pair
#include <cmath>
#include <random>

using namespace std;
// 問題が起こるまでintは使用禁止2020-04-13
using ll = long long;

#define rep(i, n) for (int i = 0; i < (n); ++i)

template <class InputIterator, class T>
bool contains_itr(InputIterator iterator, const T &value)
{
    if (find(iterator.begin(), iterator.end(), value) == iterator.end())
        return false;
    else
        return true;
}

template <class T>
bool contains_set(set<T> st, const T &value)
{
    if (st.find(value) == st.end())
    {
        return false;
    }
    else
    {
        return true;
    }
}

template <class InputIterator>
auto sum(InputIterator iterator)
{
    return accumulate(iterator.begin(), iterator.end(), 0);
}

// endは排他的(exclusive)なので注意
vector<ll> range(ll begin, ll end)
{
    vector<ll> result;
    for (ll i = begin; i < end; ++i)
    {
        result.push_back(i);
    }
    return result;
}

random_device seed_gen;
mt19937 engine(seed_gen());
// 0, 1, 2 のどれかが得られる一様分布
// uniform_int_distribution<> dist(0, 2);
// cout << dist(engine) << endl;
// みたいに、先に確率分布を宣言して、そこにengineを与えて使う。

// =========ここまでテンプレ============

vector<ll> makeMinDivisers(ll n)
{
    vector<ll> mins(n + 1);
    rep(i, n + 1) mins[i] = i;
    for (ll i = 2; i * i <= n; ++i)
    {
        if (mins[i] % i == 0)
        {
            for (ll j = 0; i + j <= n; j += i)
            {
                if (mins[i + j] == i + j)
                    mins[i + j] = i;
            }
        }
    }
    return mins;
}

// minDivisersをコピーせずに使い回すため、参照渡し
vector<pair<ll, ll>> primeFactorization(ll n, vector<ll> &minDivisers)
{
    if (n > minDivisers.size() - 1)
    {
        cout << "error! n must be <= minDivisers.size()-1" << endl;
    }
    else if (n <= 1)
    {
        cout << "error! n must be >= 2" << endl;
    }
    vector<pair<ll, ll>> result;
    ll x = n;
    ll lastDiviser = minDivisers[n];
    ll count = 0;
    while (x != 1)
    {
        if (minDivisers[x] == lastDiviser)
        {
            ++count;
            x = x / minDivisers[x];
        }
        else
        {
            result.push_back(pair<ll, ll>{lastDiviser, count});
            lastDiviser = minDivisers[x];
            count = 0;
        }
    }
    result.push_back(pair<ll, ll>{lastDiviser, count});
    return result;
}

int main()
{
    ll n;
    cin >> n;
    vector<ll> minDivisers = makeMinDivisers(1000000);
    ll result = 0;
    for (ll c = 1; c <= n - 1; ++c)
    {
        ll ab = n - c;
        if (ab == 1)
        {
            result++;
        }
        else
        {
            vector<pair<ll, ll>> ps = primeFactorization(ab, minDivisers);
            ll yakuCount = 1;
            for (auto itr = ps.begin(); itr != ps.end(); ++itr)
            {
                yakuCount *= (get<1>(*itr) + 1);
            }
            result += yakuCount;
        }
    }
    cout << result << endl;
    return 0;
}

Measured memory_bytes: 10804