Problem B
Savez
There are eight planets and one planetoid in the Solar system. It is not a well known fact that there is a secret planet S4 inhabited by small creatures similar to bears, their codename being Lodas. Although this fact is well hidden from the public, the association Savez sent a team lead by general Henrik to study the Lodas. It has been discovered that Lodas have the ability of teleportation and he wants to hire them in his army.
One Lod consists of
Determine the number of teleportations.
Input
The first line of input contains of the integer
Output
The first and only line of output must contain the number of teleportations a Loda can make.
Sample Input 1 | Sample Output 1 |
---|---|
5 A B AA BBB AAA |
3 |
Sample Input 2 | Sample Output 2 |
---|---|
5 A ABA BBB ABABA AAAAAB |
3 |
Sample Input 3 | Sample Output 3 |
---|---|
6 A B A B A B |
3 |