use std::{ collections::{BTreeSet, HashMap}, hash::Hash, }; fn main() { proconio::input! { n: usize, v: [i64; n], } let mut a = vec![0, v[0]]; for v in v.into_iter().skip(1) { a.push(std::cmp::max(a[a.len() - 1], a[a.len() - 2] + v)); } println!("{}", a[a.len() - 1]); }