You have a stack of 5 plates of different sizes as shown in the left figure below. In each move you can pick up the top k plates (k is from 1 to 5) and flip them over. For example, if you do this with the top 3 plates you will get the result shown in the right figure below.
What is the least number of moves needed to reverse the order of the plates, while keeping them the right way up, as shown in the following figure?