#include <bits/stdc++.h>
using namespace std;
int b[2], c;
int main() {
  char a[105];
  cin >> a;
  int l = strlen(a), i;
  for (i = 0; i < l; i++) {
    b[0] = b[1];
    if (a[i] == 'A' || a[i] == 'E' || a[i] == 'I' || a[i] == 'O' ||
        a[i] == 'U' || a[i] == 'Y')
      b[1] = i + 1;
    if (b[1] - b[0] > c) c = b[1] - b[0];
  }
  if (l - b[1] + 1 > c) c = l + 1 - b[1];
  cout << c;
  return 0;
}
