>>9
char buf[1024], *p; int cnt;
fgets(buf, sizeof buf, stdin);
for (p = buf + 1, cnt = 1; *p; p++) if (*buf == *p) cnt++;
printf("%d\n", cnt);