use proconio::{input}; fn main() { input!{ n: usize, m: i64, } let mut vec = vec![m; n+1]; for i in 0..=n{ vec[i] = m; } for i in 1..=n{ for j in 1..=n/i{ vec[i*j] -= i as i64; } } let mut ans = 0; let mut ac = 0; for i in 1..=n{ ac += vec[i]; ans = ans.max(ac); } println!("{}", ans); }