#include <bits/stdc++.h>
using namespace std;
void use_io_optimizations() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
}
int main() {
  use_io_optimizations();
  string s;
  cin >> s;
  s += 'A';
  int res = 0;
  int current = -1;
  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') {
      res = max(res, i - current);
      current = i;
    }
  }
  cout << res << '\n';
  return 0;
}
