import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

public class Euler738 {
    static final long kMod = 1000000007L;

    static boolean powerLeq(long base, int exp, long limit) {
        long p = 1;
        for (int i = 0; i < exp; ++i) {
            if (Long.MAX_VALUE / base < p)
                return false;
            p *= base;
            if (p > limit)
                return false;
        }
        return true;
    }

    static long intRoot(long n, int k) {
        if (n == 0)
            return 0;
        double guess = Math.pow((double) n, 1.0 / k);
        long r = (long) guess;
        if (r < 1L)
            r = 1L;

        while (powerLeq(r + 1, k, n)) {
            r++;
        }
        while (!powerLeq(r, k, n)) {
            r--;
        }
        return r;
    }

    static class Key {
        long limit, minFactor;
        int parts;

        Key(long limit, long minFactor, int parts) {
            this.limit = limit;
            this.minFactor = minFactor;
            this.parts = parts;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o)
                return true;
            if (o == null || getClass() != o.getClass())
                return false;
            Key key = (Key) o;
            return limit == key.limit && minFactor == key.minFactor && parts == key.parts;
        }

        @Override
        public int hashCode() {
            return Objects.hash(limit, minFactor, parts);
        }
    }

    static long countNondecreasing(long limit, long minFactor, int parts, Map<Key, Long> memo) {
        if (parts == 0)
            return 1L;
        if (parts == 1) {
            if (limit < minFactor)
                return 0L;
            return limit - minFactor + 1L;
        }

        Key key = new Key(limit, minFactor, parts);
        Long cached = memo.get(key);
        if (cached != null)
            return cached;

        long r = intRoot(limit, parts);
        if (r < minFactor) {
            memo.put(key, 0L);
            return 0L;
        }

        long total = 0L;
        for (long x = minFactor; x <= r; ++x) {
            total += countNondecreasing(limit / x, x, parts - 1, memo);
        }

        memo.put(key, total);
        return total;
    }

    public static String solve() {
        long N = 10000000000L;
        long K = 10000000000L;

        int maxParts = 0;
        for (long p = 1; p <= N; p <<= 1) {
            maxParts++;
        }
        maxParts--;

        long[] counts = new long[maxParts + 1];
        counts[0] = 1L;

        Map<Key, Long> memo = new HashMap<>(1 << 20);

        for (int m = 1; m <= maxParts; ++m) {
            counts[m] = countNondecreasing(N, 2L, m, memo);
        }

        long answer = K % kMod;
        for (int m = 1; m <= maxParts; ++m) {
            if (m > K)
                break;
            long ways = counts[m] % kMod;
            long multiplicity = (K - m + 1L) % kMod;
            answer = (answer + ways * multiplicity) % kMod;
        }

        return Long.toString(answer);
    }

    public static void main(String[] args) {
        System.out.println(solve());
    }
}
