#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:256000000")
using namespace std;
const double EPS = 1e-9;
const double pi = acos(-1.0);
const long long MAXN = (long long)1e5 + 7;
const long long INF = (long long)1e9 + 7;
const long long LINF = (long long)1 << 63 - 5;
const long long MOD = (long long)2000000033;
const long long P = 2390117;
const long long SZ = (long long)1e5;
bool check(char c) {
  return (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U' || c == 'Y');
}
int main() {
  string s;
  cin >> s;
  long long ans = 0;
  long long curcnt = 0;
  int i = 0;
  while (i < s.size()) {
    long long curans = 0;
    while (check(s[i])) {
      i++;
      if (i == s.size()) break;
    }
    if (i == s.size()) break;
    curans = 0;
    while (!check(s[i])) {
      i++;
      curans++;
      if (i == s.size()) break;
    }
    ans = max(ans, curans);
  }
  cout << ans + 1;
  return 0;
}
