#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int i, l;
  l = s.length();
  vector<int> a;
  for (i = 0; i < l; i++) {
    if (s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' ||
        s[i] == 'U' || s[i] == 'Y')
      a.push_back(i);
  }
  int pre = -1, mx = 1;
  for (i = 0; i < a.size(); i++) {
    if ((a[i] - pre) > mx) mx = a[i] - pre;
    pre = a[i];
  }
  if (l - pre > mx) mx = l - pre;
  printf("%d\n", mx);
  return 0;
}
