#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[101];
  cin >> a;
  char str[103] = "X";
  strcat(str, a);
  char x[7] = "AEIOUY";
  int len = strlen(str);
  int reminder = 0;
  int maxima = 0;
  int i;
  for (i = 0; i < len; i++) {
    bool flag = false;
    for (int j = 0; j < 6; j++) {
      if (str[i] == x[j]) {
        flag = true;
        break;
      }
    }
    if (flag == true) {
      int q = i - reminder;
      if (maxima < q) {
        maxima = q;
      }
      reminder = i;
    }
  }
  int q = len - reminder;
  if (maxima < q) {
    maxima = q;
  }
  cout << maxima;
  return 0;
}
