Piles of coins and graph