#include <bits/stdc++.h>
using namespace std;
bool isVow(char a) {
  return a == 'A' || a == 'E' || a == 'I' || a == 'O' || a == 'U' || a == 'Y';
}
int main() {
  string s;
  cin >> s;
  s += 'A';
  int nCons{0}, maxCons{0};
  for (int i = 0; i < s.length(); ++i) {
    if (isVow(s[i])) {
      maxCons = max(nCons, maxCons);
      nCons = 0;
    } else
      ++nCons;
  }
  cout << maxCons + 1 << endl;
  return 0;
}
