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