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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <bits/stdc++.h>

using namespace std;

const int maxn = 2e5 + 5;
const int INF = maxn;
string napis;
int n;

long long lastpos;

long long wyn = 0;

//czy samogloska
inline bool znak(const char& jabadabadu){
	if( jabadabadu == 'a'
	    || jabadabadu == 'e'
		|| jabadabadu == 'i'
		|| jabadabadu == 'o'
		|| jabadabadu == 'u'
		|| jabadabadu == 'y' ) {
		return true;
	}
	return false;
}

inline bool tripleKill(int pos){
	if(pos <= n - 3){
		if(znak(napis[pos]) == znak(napis[pos + 1]) && znak(napis[pos + 1]) == znak(napis[pos + 2])){
			return true;
		}
	}
	return false;
}

inline bool tripleReverseKill(int pos){
	if(pos >= 2){
		if(znak(napis[pos]) == znak(napis[pos - 1]) && znak(napis[pos - 1]) == znak(napis[pos - 2])){
			return true;
		}
	}
	return false;
}

int main(){
	cin>>napis;
	n = napis.size();
	
	lastpos = n + 10;
	
	for(int i = n-1; i >= 0; i--){
		if(tripleKill(i)){
			lastpos = i+2;
		}
		wyn += max(0LL, n - lastpos);
	}
	printf("%lld\n", wyn);
}