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