http://www.spoj.com/problems/ADDREV