#include #include #define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++) using namespace atcoder; using namespace std; typedef long long ll; struct RangeAPQuery { int n; vector v, pre; RangeAPQuery(int input) { n = input; v.resize(n); pre.resize(n + 2); } void add(ll l, ll r, ll a0, ll d) { // 初項 a0, 等差 d // [l, r] <- +{an} if (l > r) return; assert(l <= r); pre[l] += a0; pre[l + 1] += d - a0; pre[r + 1] -= a0 + d * (r - l + 1); pre[r + 2] += a0 + d * (r - l + 1) - d; } void addr(ll l, ll r, ll a0, ll d) { // 初項 a0, 等差 d // [l, r] <- +{an(rev)} if (l > r) swap(l, r); add(l, r, (r - l) * d + a0, -d); } void make() { rep(i, 0, pre.size() - 1) pre[i + 1] += pre[i]; rep(i, 0, pre.size() - 1) pre[i + 1] += pre[i]; rep(i, 0, n) { v[i] += pre[i]; pre[i] = 0; } } ll get(int ind) { return v[ind]; } }; int main() { int n, m; cin >> n >> m; RangeAPQuery raq(200010); rep(d, 2, m + 1) { int ind = 0; while (1) { int l = ind, r = ind + d; if (r >= 200005) r = 200005; if (l > r) break; raq.add(l, r - 1, 0, 1); ind += d; } } raq.make(); ll ans = 0; rep(i, 0, n + 1) { ans = max(ans, raq.get(i)); // cerr << raq.get(i) << " "; } cout << ans << endl; }