#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  long long i, j;
  vector<long long> v;
  for (i = -1, j = 0; i < s.size(), j < s.size(); j++) {
    if (s[j] == 'A' or s[j] == 'E' or s[j] == 'I' or s[j] == 'O' or
        s[j] == 'U' or s[j] == 'Y') {
      v.push_back(j - i);
      i = j;
    }
  }
  v.push_back(s.size() - i);
  sort(v.begin(), v.end());
  cout << v[v.size() - 1];
  return 0;
}
