dark coin puzzle

Very cool quick puzzle that has a “surprisingly easy solution.” I had to think about the solution to fully realise, yes it is surprisingly easy.

darkcoinpuzzle

You’re in a completely dark dungeon room with hundreds of coins; each coin has a silver side and a gold side. There are 20 coins with silver side facing up, the rest has its gold side facing up. You are to separate the coins into two piles, and each pile must contain the same number of silver-side up coins. The size of the piles may be different. The coins feel the same and flipping is allowed.

Hint: algebra is involved in the solution.