#include <bits/stdc++.h>
using namespace std;
int tart, maxi, o;
string s;
int main() {
  cin >> s;
  o = s.size();
  tart = -1;
  for (int i = 0; i < o; i++) {
    if (s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' ||
        s[i] == 'U' || s[i] == 'Y') {
      maxi = max(maxi, i - tart);
      tart = i;
    }
  }
  maxi = max(maxi, o - tart);
  cout << maxi << endl;
  return 0;
}
