#include <bits/stdc++.h>
using namespace std;
bool check(char ch) {
  return ((ch == 'A') || (ch == 'E') || (ch == 'I') || (ch == 'O') ||
          (ch == 'U') || (ch == 'Y'));
}
int main() {
  string s;
  cin >> s;
  vector<int> vec(1, 0);
  for (int i = 0; i < s.size(); ++i)
    if (check(s[i])) vec.push_back(i + 1);
  vec.push_back(s.size() + 1);
  int ans = 0;
  for (int i = 1; i < vec.size(); ++i) {
    ans = max(ans, vec[i] - vec[i - 1]);
  }
  cout << ans << "\n";
  return 0;
}
