Dynamic programming: Maximize total value
For $k \in [\![1, n]\!]$, you can define $f(k)$ as the maximum value reachable using objects $1$, $2$, …, $k$, without two consecutives objects.
Now the key to the dynamic programming implementation is to see that:
$\forall k \in [\![3, n]\!], f(k) = \max(f(k-1), f(k-2) + V[k])$
The reason is that to compute $f(k)$, you can either keep the $k$-th object or not. If you keep it, then you cannot keep the $k-1$-th object.
Finally, you want to compute $f(n)$.