#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000007;
const int MINF = -1000000007;
const double Pi = 3.141592653;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int ToInt(const string &buff) {
  int res;
  stringstream st;
  st << buff;
  st >> res;
  return res;
}
string ToString(const int &buff) {
  string res;
  stringstream st;
  st << buff;
  st >> res;
  return res;
}
bool IsPrime(const int &buff) {
  for (int i = 2; i * i <= buff; ++i)
    if (buff % i == 0) return false;
  return true;
}
vector<long long> Power2(int power) {
  long long buff = 1;
  vector<long long> res(power);
  for (int i = 0; i <= power; ++i) res.push_back(buff << i);
  return res;
}
long long FastPow(long long a, int n) {
  long long res = 1;
  while (n) {
    if (n & 1) res *= a;
    a *= a;
    n >>= 1;
  }
  return res;
}
void solve() {
  string a;
  cin >> a;
  vector<int> res;
  int ans = 0;
  char let[6] = {'A', 'E', 'I', 'O', 'U', 'Y'};
  res.push_back(-1);
  for (int i = 0; i < a.size(); ++i) {
    for (int j = 0; j < 6; ++j) {
      if (a[i] == let[j]) res.push_back(i);
    }
  }
  res.push_back(a.size());
  for (int i = 1; i < res.size(); ++i) {
    if (res[i] - res[i - 1] > ans) ans = res[i] - res[i - 1];
  }
  cout << ans;
}
int main() { solve(); }
