#include <bits/stdc++.h>
using namespace std;
char b[] = {'A', 'E', 'I', 'O', 'U', 'Y'};
bool good(char c) {
  for (int i(0); i < 6; ++i)
    if (c == b[i]) return true;
  return false;
}
int main() {
  int last(-1), ans(0);
  int cnt(0);
  for (char c = getchar(); c != '\n'; c = getchar(), ++cnt)
    if (good(c)) {
      ans = max(ans, cnt - last);
      last = cnt;
    }
  ans = max(cnt - last, ans);
  printf("%i", ans);
}
