#include <bits/stdc++.h>
using namespace std;
inline int _Int() {
  int x;
  scanf("%d", &x);
  return x;
}
long long int bigMod(long long int A, long long int P, int M) {
  long long int R = 1;
  for (A %= M; P; P >>= 1) {
    if (P & 1) R = (R * A) % M;
    A = (A * A) % M;
  }
  return R;
}
long long int bigMul(long long int A, long long int B, long long int M) {
  long long int R = 0;
  for (A %= M; B; B >>= 1) {
    if (B & 1) R = (R + A) % M;
    A = (A + A) % M;
  }
  return R;
}
long long int negMod(long long int A, long long int B) {
  return (((A % B) + B) % B);
}
unsigned long long int _pow(unsigned long long int A, int P) {
  unsigned long long int R = 1;
  for (; P; P >>= 1) {
    if (P & 1) R = (R * A);
    A = (A * A);
  }
  return R;
}
template <class T>
T GCD(T x, T y) {
  while (x) x ^= y ^= x ^= y %= x;
  return y;
}
bool isVowel(char c) {
  if (c == 'A') return 1;
  if (c == 'E') return 1;
  if (c == 'I') return 1;
  if (c == 'O') return 1;
  if (c == 'U') return 1;
  if (c == 'Y') return 1;
  return 0;
}
char s[100 + 7];
void Main() {
  scanf("%s", s + 1);
  int left = 0;
  int n = strlen(s + 1), mx = 1;
  for (int i = 1; i <= n; i++) {
    if (isVowel(s[i])) {
      mx = max(mx, i - left);
      left = i;
    }
  }
  mx = max(mx, n + 1 - left);
  printf("%d\n", mx);
}
int main() {
  Main();
  return 0;
}
