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
#include <stdint.h>
#include <stdio.h>

void putint16_t(int64_t x) {
  if(x >= 10) putint16_t(x / 10);
  putchar_unlocked('0' + (x % 10));
}

int main() {
  static int v[256];
  int ch;
  int i = 0;
  int p = 2, r = 0, x = 0;
  int64_t ans = 0;
  
  v['a'] = v['e'] = v['i'] = v['o'] = v['u'] = v['y'] = 1;
  
  while((ch = getchar_unlocked()) != EOF) {
    if(ch < '0') continue;
    if(v[ch] != p) r = 0;
    if(r > 1) x = i - 1;
    ans += x;
    p = v[ch];
    r++;
    i++;
  }
  
  putint16_t(ans);
  putchar_unlocked('\n');
  
  return 0;
}