#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, r;
  cin >> s;
  r.resize(s.size() + 5);
  r[0] = 'Y';
  r[s.size() + 1] = 'Y';
  for (int i = 1; i <= s.size(); i++) r[i] = s[i - 1];
  int ans = INT_MIN;
  int idx = 0;
  for (int i = 0; i <= s.size() + 1; i++) {
    if (r[i] == 'A' || r[i] == 'E' || r[i] == 'I' || r[i] == 'O' ||
        r[i] == 'U' || r[i] == 'Y') {
      ans = max(ans, i - idx);
      idx = i;
    }
  }
  cout << ans << endl;
  return 0;
}
