mirror of
https://github.com/tiennm99/codeforces.git
synced 2026-06-09 10:12:55 +00:00
21 lines
283 B
C++
21 lines
283 B
C++
#include <iostream>
|
|
#include <string>
|
|
|
|
using namespace std;
|
|
|
|
int main()
|
|
{
|
|
string s;
|
|
int c = 0;
|
|
getline(cin, s);
|
|
for (int i = s.length() - 2; i > 0; i -= 3)
|
|
{
|
|
if (s.find(s[i]) == i)
|
|
{
|
|
c++;
|
|
}
|
|
}
|
|
cout << c;
|
|
return 0;
|
|
}
|