You are blindfolded, and there are a number of shiny, smooth coins in front of you. One side is purple and the other side is green. Your friend tells you, once, the number of purple coins there are. Your job is to separate the coins so that there are the same number of purple coins on both sides. You can flip any coin as many times as you like. How do you accomplish this, and how do you know when you are finished?
You cannot see through the blindfold, and you cannot tell if a coin is purple side up or green side up.
Assume that you are not allowed to do things like remove your blindfold.
(from the Williams College Math Camp 2017; note that I do not know the actual answer, but if it makes sense to me and the community then I will mark it as the answer)