Pergunta de entrevista da empresa ABBYY

Dynamic programming question about the maximal partial sum of an array. Restriction: one cannot use two adjacent elements of the array