#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  set<char> al;
  al.insert('A');
  al.insert('E');
  al.insert('Y');
  al.insert('U');
  al.insert('I');
  al.insert('O');
  int k = 1;
  int ma = 0;
  bool fl = 0;
  for (int i = 0; i < s.size(); i++) {
    if (al.count(s[i])) {
      ma = max(k, ma);
      k = 1;
      fl = true;
    } else {
      k++;
    }
  }
  ma = max(k, ma);
  if (fl)
    cout << ma;
  else
    cout << s.size() + 1;
}
