#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  getline(cin, str);
  vector<int> v;
  v.push_back(0);
  set<char> st = {'A', 'E', 'I', 'O', 'U', 'Y'};
  for (int i = 0; i < str.length(); ++i) {
    if (st.find(str[i]) != st.end()) {
      v.push_back(i + 1);
    }
  }
  v.push_back(str.length() + 1);
  int ans = 0;
  for (int i = 1; i < v.size(); ++i) {
    ans = max(ans, v[i] - v[i - 1]);
  }
  cout << ans << endl;
  return 0;
}
