You will need two different types of coins or two different coloured counters. Arrange them on a line like this.

.
The aim is to change the positions so that they end up like this.

.
Rules:
In a move, you can move any two coins that are next to each other to anywhere else on the line. They must stay together and you can not swap the order of the coins when you move them.
Here is an example:

.
It is possible to do it in four moves
.
If you have solved the problem, try it with two extra coins. What is the minimum moves needed to get from the starting position here…

.
… to the finishing position:
