Problem 1276: Cash Machine. Solved on 06/09/2014.