#include <bits/stdc++.h>
using namespace std;
inline long long rit() {
  int key = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') key = -1;
    c = getchar();
  }
  long long x = 0;
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * key;
}
int main() {
  string s;
  cin >> s;
  int maxn = 0, cur = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' ||
        s[i] == 'U' || s[i] == 'Y') {
      maxn = max(cur + 1, maxn);
      cur = 0;
    } else
      cur++;
  }
  maxn = max(maxn, cur + 1);
  cout << maxn << endl;
  return 0;
}
