import sequtils,strutils,strscans,algorithm,math,future,macros template get*():string = stdin.readLine() #.strip() let N = get().parseInt() V = get().split().map(parseInt) var ok,no = 0 for i,v in V: (no,ok) = (ok + v,max(ok,no)) echo max(ok,no)