fn read_i64()->i64{ let mut buf = String::new(); let x = std::io::stdin().read_line(& mut buf); buf.trim().parse::().unwrap() } fn main() { let n = read_i64(); let mut max:i64 = 0; for i in n/2-100..n/2+100{ //println!("{}", (n-i+ 1)*i + (n-i)); let nmod:i64 = 504012188255603%1000007; let imod:i64 = i%1000007; max = std::cmp::max(max, ((((nmod-imod+1)%1000007)*(imod%1000007)) + (nmod-imod)%1000007)%1000007); } println!("{}", max); }