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