#include <bits/stdc++.h>
using namespace std;
inline int Set(int N, int pos) { return N = N | (1 << pos); }
inline int Reset(int N, int pos) { return N = N & ~(1 << pos); }
inline bool check(int N, int pos) { return (bool)(N & (1 << pos)); }
template <class T>
T gcd(T a, T b) {
  return (!b) ? a : gcd(b, a % b);
}
template <class T>
T lcm(T a, T b) {
  return (a / gcd(a, b)) * b;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string s;
  int p = -1, ans = 0;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' ||
        s[i] == 'U' || s[i] == 'Y') {
      ans = max(ans, i - p);
      p = i;
    }
  }
  ans = max(ans, (int)s.size() - p);
  cout << ans << endl;
  return 0;
}
