#include <bits/stdc++.h>

using namespace std;

using ll = long long;

const ll MOD = 1000000007;

ll modpow(ll x, ll n, ll mod = MOD) {
    ll res = 1;
    while (n > 0) {
        if (n & 1) res = res * x % mod;
        x = x * x % mod;
        n >>= 1;
    }
    return res;
}

template <typename T>
struct LazySegmentTree {
    int n;
    vector<T> data;
    vector<T> lazy;
    T INITIAL_DATA_VALUE;
    T INITIAL_LAZY_VALUE;

    //使うときは、この3つを適宜変更する
    static T merge(T x, T y);
    void updateNode(int k, T x);
    void apply(int k, int seg_len);

    void init(int size, T initial_data_value, T initial_lazy_value) {
        n = 1;
        INITIAL_DATA_VALUE = initial_data_value;
        INITIAL_LAZY_VALUE = initial_lazy_value;
        while (n < size) n *= 2;
        data.resize(2 * n - 1, INITIAL_DATA_VALUE);
        lazy.resize(2 * n - 1, INITIAL_LAZY_VALUE);
    }

    void init(const vector<T>& v, T initial_data_value, T initial_lazy_value) {
        int size = v.size();
        n = 1;
        INITIAL_DATA_VALUE = initial_data_value;
        INITIAL_LAZY_VALUE = initial_lazy_value;
        while (n < size) n *= 2;
        data.resize(2 * n - 1, INITIAL_DATA_VALUE);
        lazy.resize(2 * n - 1, INITIAL_LAZY_VALUE);

        for (int i = 0; i < size; i++) data[i + n - 1] = v[i];
        for (int i = n - 2; i >= 0; i--) data[i] = merge(data[i * 2 + 1], data[i * 2 + 2]);
    }

    LazySegmentTree(int size, T initial_data_value, T initial_lazy_value) {
        init(size, initial_data_value, initial_lazy_value);
    }

    LazySegmentTree(int size, T initial_value) {
        init(size, initial_value, initial_value);
    }

    LazySegmentTree(const vector<T>& v, T initial_data_value, T initial_lazy_value) {
        init(v, initial_data_value, initial_lazy_value);
    }

    LazySegmentTree(const vector<T>& v, T initial_value) {
        init(v, initial_value, initial_value);
    }

    T getLeaf(int k) {
        return data[k + n - 1];
    }

    void eval(int k, int l, int r) {
        if (lazy[k] == INITIAL_LAZY_VALUE) return;
        apply(k, r - l);
        if (r - l > 1) {
            updateNode(2 * k + 1, lazy[k]);
            updateNode(2 * k + 2, lazy[k]);
        }
        lazy[k] = INITIAL_LAZY_VALUE;
    }

    //区間[a, b)に対する更新
    //k:節点番号, [l, r):節点に対応する区間
    void update(int a, int b, T x, int k, int l, int r) {
        eval(k, l, r);
        //[a, b)と[l, r)が交差しない場合
        if (r <= a || b <= l) return;
        //[a, b)が[l, r)を含む場合、節点の値
        if (a <= l && r <= b) {
            updateNode(k, x);
            eval(k, l, r);
        } else {
            update(a, b, x, k * 2 + 1, l, (l + r) / 2);
            update(a, b, x, k * 2 + 2, (l + r) / 2, r);
            data[k] = merge(data[2 * k + 1], data[2 * k + 2]);
        }
    }

    void update(int a, int b, T x) {
        update(a, b, x, 0, 0, n);
    }

    //区間[a, b)に対するクエリに答える
    //k:節点番号, [l, r):節点に対応する区間
    T query(int a, int b, int k, int l, int r) {
        eval(k, l, r);
        //[a, b)と[l, r)が交差しない場合
        if (r <= a || b <= l) return INITIAL_DATA_VALUE;
        //[a, b)が[l, r)を含む場合、節点の値
        if (a <= l && r <= b) return data[k];
        else {
            //二つの子をマージ
            T vl = query(a, b, k * 2 + 1, l, (l + r) / 2);
            T vr = query(a, b, k * 2 + 2, (l + r) / 2, r);
            return merge(vl, vr);
        }
    }

    //外から呼ぶ用
    T query(int a, int b) {
        return query(a, b, 0, 0, n);
    }
};

//使うときは以下3つを変更
template <typename T>
T LazySegmentTree<T>::merge(T x, T y) {
    return (x + y) % MOD;
}

template <typename T>
void LazySegmentTree<T>::updateNode(int k, T x) {
    (lazy[k] += x) %= MOD;
}

template <typename T>
void LazySegmentTree<T>::apply(int k, int seg_len) {
    (data[k] += lazy[k] * seg_len % MOD) %= MOD;
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n;
    int K;
    cin >> n >> K;

    ll sqrtN = 0;
    while (true) {
        int nex = sqrtN + 1;
        if (nex * nex > n) break;
        sqrtN = nex;
    }

    vector<ll> coef(sqrtN + 1, 0);
    for (int i = 1; i <= sqrtN; i++) {
        coef[i] = n / i - max(n / (i + 1), sqrtN);
        //cerr << i << " " << coef[i] << endl;
    }

    vector< vector<ll> > dp(2, vector<ll>(sqrtN + 1, 0));
    dp[0][1] = 1;
    for (int i = 0; i < K; i++) {
        vector< vector<ll> > ndp(2, vector<ll>(sqrtN + 1, 0));
        ll sum1 = 0;
        for (int j = sqrtN; j >= 1; j--) {
            (sum1 += dp[1][j] * coef[j] % MOD) %= MOD;
            (ndp[0][j] += sum1) %= MOD;
        }

        ll sum2 = 0;
        for (int j = 1; j <= sqrtN; j++) {
            (sum2 += dp[0][j]) %= MOD;
            (ndp[1][j] += sum2) %= MOD;
        }

        for (int j = 1; j <= sqrtN; j++) {
            (ndp[0][j] += sum2) %= MOD;
        }

        dp = move(ndp);
    }

    ll ans = 0;
    for (int i = 1; i <= sqrtN; i++) {
        (ans += dp[0][i]) %= MOD;
        (ans += dp[1][i] * coef[i] % MOD) %= MOD;
    }
    cout << ans << "\n";
    return 0;
}

Measured memory_bytes: 1804