#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  int n, i, j = 1, jump = 1;
  cin >> s;
  n = s.size();
  bool flag = true;
  for (i = 0; i < n; i++) {
    if (s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'U' ||
        s[i] == 'O' || s[i] == 'Y') {
      jump = max(jump, j);
      j = 1;
      flag = false;
    } else {
      j++;
    }
  }
  jump = max(jump, j);
  if (flag)
    cout << n + 1 << endl;
  else
    cout << jump << endl;
  return 0;
}
