#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  string in_str;
  while (cin >> in_str) {
    map<char, int> vowels;
    vowels['A'] = 1;
    vowels['E'] = 1;
    vowels['I'] = 1;
    vowels['O'] = 1;
    vowels['U'] = 1;
    vowels['Y'] = 1;
    int ans = 0;
    int now = -1;
    int index = -1;
    for (int i = 0; i < in_str.length(); i++) {
      if (vowels[in_str[i]] == 1) {
        index = i;
        ans = max(ans, index - now);
        now = index;
      }
    }
    if (now != in_str.length()) ans = max(ans, int(in_str.length()) - now);
    cout << ans << endl;
  }
  return 0;
}
