import std.stdio; import std.string, std.conv, std.array, std.algorithm; import std.uni, std.math, std.container; import core.bitop, std.datetime; void main(){ int N = readln.chomp.to!int; auto V = readln.split.to!(int[]); int toreru = 0, torenai = 0; foreach(v ; V){ int tmp = toreru; toreru = torenai; torenai = max(torenai, tmp + v); } writeln(max(toreru, torenai)); }