the USA Construction Operation USACO recently order Farmer John arrange row n haybale pile farm the ith pile contain a_i haybale however Farmer John leave vacation leave Bessie every day Bessie naughty cow choose haybale pile adjacent pile Formally day choose index j 1 le j le n ij1 a_i0 apply a_i a_i 1 a_j a_j 1 she decide day lazyBessie want maximize number haybale pile 1 ie maximize a_1 d day Farmer John return help find maximum number haybale pile 1 act optimally