#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  vector<int> v;
  v.push_back(-1);
  for (int i = 0; i < s.length(); i++) {
    if (s.at(i) == 'A' || s.at(i) == 'E' || s.at(i) == 'I' || s.at(i) == 'O' ||
        s.at(i) == 'U' || s.at(i) == 'Y')
      v.push_back(i);
  }
  v.push_back(s.length());
  int best = 1;
  for (int i = 0; i < v.size() - 1; i++) {
    int diff = v[i + 1] - v[i];
    best = max(best, diff);
  }
  cout << best;
  return 0;
}
