1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <iostream>
#include <cstdio>

using namespace std;

char slowo[200005];
int tab[200005];

int k, ost;
long long result;

int main ()
{
	gets(slowo);
	while (slowo[k]) k++;
	for (int i = 0; i < k; ++i)
	{
		if (slowo[i] == 'a') tab[i] = 1;
		else if (slowo[i] == 'e') tab[i] = 1;
		else if (slowo[i] == 'i') tab[i] = 1;
		else if (slowo[i] == 'o') tab[i] = 1;
		else if (slowo[i] == 'u') tab[i] = 1;
		else if (slowo[i] == 'y') tab[i] = 1;
		else tab[i] = 0;
	}
	ost = -1;
	for (int i = 2; i < k; ++i)
	{
		if (tab[i] == tab[i - 1] && tab[i] == tab[i - 2]) ost = i - 2;
		result += (long long)(ost + 1);
	}
	printf("%lld\n", result);
	return 0;
}