Rise up

You are given N piles of stones. The piles are numbered 1 to N from left to right. Each pile contains non negative number of stones. Total number of stones in the N piles is 2N-1. In one move you are allowed to move some stones from a pile to an adjacent pile .

This is a companion discussion topic for the original entry at https://toph.co/p/rise-up