use std::cmp; fn calc(x: i64, m: i64) -> i64 { let mut ans = x * m; let mut ind = 1; while ind <= m { let k = x / ind; if k == 0 { break; } let max_ind = x / k; let max_ind = cmp::min(max_ind, m); ans -= (ind + max_ind) * (max_ind - ind + 1) * k / 2; ind = max_ind + 1; } ans } fn main() { let mut input = String::new(); std::io::stdin().read_line(&mut input).unwrap(); let parts: Vec = input .trim() .split_whitespace() .map(|s| s.parse().unwrap()) .collect(); let n = parts[0]; let m = parts[1]; let mut ans = 0; for i in 0..=n { ans = cmp::max(ans, calc(i, m)); } println!("{}", ans); }