#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int MOD(long long a) { return a % mod < 0 ? (a % mod) + mod : a % mod; }
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
int pow(int base, int exp) {
  base %= mod;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((long long)result * base) % mod;
    base = ((long long)base * base) % mod;
    exp >>= 1;
  }
  return result;
}
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second > b.second);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string str;
  cin >> str;
  int ans = 0;
  int n = str.length();
  vector<int> arr(n + 1, 0);
  char vow[] = {'A', 'E', 'I', 'O', 'U', 'Y'};
  for (int i = 0; i < n; i++) {
    bool is = false;
    for (int j = 0; j < 6; j++) {
      if (vow[j] == str[i]) {
        is = true;
      }
    }
    if (!is) {
      arr[i + 1] = arr[i] + 1;
    }
    ans = max(ans, arr[i + 1]);
  }
  cout << ans + 1;
  return 0;
}
