#include <bits/stdc++.h>
using namespace std;
char s[666666];
bool vv[666666];
int main() {
  vv['A'] = vv['E'] = vv['I'] = vv['U'] = vv['O'] = vv['Y'] = 1;
  scanf("%s", s);
  int cur = -1, tar = strlen(s), ans = 0;
  for (int i = 0; s[i]; i++) {
    if (vv[s[i]])
      ;
    else
      continue;
    ans = max(ans, i - cur);
    cur = i;
  }
  ans = max(ans, tar - cur);
  printf("%d\n", ans);
}
