#include <bits/stdc++.h>
using namespace std;
using LL = long long;
string v = "AEIOUY";
bool ok(char c) {
  for (auto s : v)
    if (c == s) return 1;
  return 0;
}
int main() {
  string s;
  cin >> s;
  int p = -1;
  int ans = 0;
  for (int i = 0; i < s.size(); i++) {
    if (ok(s[i])) ans = max(ans, i - p), p = i;
  }
  ans = max(ans, (int)s.size() - p);
  cout << ans << endl;
}
