#include
using namespace std;
int main()
{
int n, i;
cout << “The number of stones:” << endl;
cin >> n;
char *stone = NULL, *p;
stone = new char[n];
for (i = 0; i < n; i++)
{
cin >> stone[i];
}
int m = 0;
for (int i = 0; i < n-1; i++)
{
if (stone[i] == stone[i+1])
{
m = m + 1;
}
}
cout << “The number of the taking stones:” << endl;
cout<<m;
system(“pause”);
}