#include <bits/stdc++.h>
using namespace std;
char s[110];
int l;
int main() {
  scanf("%s", s);
  l = strlen(s);
  int ll, ri, maxn;
  maxn = -1;
  ll = 0;
  ri = 0;
  for (int i = 0; i < l; i++) {
    if (s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' ||
        s[i] == 'U' || s[i] == 'Y') {
      ll = ri;
      ri = i + 1;
      if (ri - ll > maxn) {
        maxn = ri - ll;
      }
    }
  }
  ll = ri;
  ri = l + 1;
  if (ri - ll > maxn) maxn = ri - ll;
  cout << maxn << endl;
}
