#include <bits/stdc++.h>
using namespace std;
int main() {
  char p[105];
  int k = 0, mk = 0;
  cin >> p;
  for (int i(0); i < strlen(p); i++) {
    k++;
    if (p[i] == 'E' || p[i] == 'Y' || p[i] == 'U' || p[i] == 'I' ||
        p[i] == 'O' || p[i] == 'A') {
      mk = max(mk, k);
      k = 0;
    }
  }
  k++;
  mk = max(mk, k);
  cout << mk;
  return 0;
}
