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