#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
char s[N];
int len, ans = -1, last = -1, j;
bool check(char a) {
  if (a == 'A' || a == 'E' || a == 'I' || a == 'O' || a == 'U' || a == 'Y') {
    return true;
  }
  return false;
}
int main() {
  scanf("%s", s);
  len = strlen(s);
  for (j = 0; j < len; j++) {
    if (check(s[j])) {
      ans = max(ans, j - last);
      last = j;
    }
  }
  ans = max(ans, j - last);
  printf("%d\n", ans);
  return 0;
}
