#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  string v = "AEIOUY";
  int prev = -1;
  cin >> s;
  s += "A";
  int ans = 0;
  for (int i = 0; i < s.size(); ++i) {
    if (v.find(s[i]) != v.npos) {
      ans = max(ans, i - prev);
      prev = i;
    }
  }
  cout << ans << endl;
  return 0;
}
