#include <bits/stdc++.h>
using std::abs;
using std::array;
using std::cerr;
using std::cin;
using std::cout;
using std::generate;
using std::make_pair;
using std::map;
using std::max;
using std::max_element;
using std::min;
using std::min_element;
using std::pair;
using std::reverse;
using std::set;
using std::sort;
using std::string;
using std::unique;
using std::vector;
template <typename T>
T input() {
  T res;
  cin >> res;
  return res;
}
template <typename IT>
void input_seq(IT b, IT e) {
  std::generate(b, e,
                input<typename std::remove_reference<decltype(*b)>::type>);
}
int main() {
  std::iostream::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  string st;
  cin >> st;
  int prev = -1;
  int ans = -10;
  int i = 0;
  for (char ch : st) {
    char tmp[6] = {'A', 'E', 'I', 'O', 'U', 'Y'};
    if (std::find(tmp, tmp + 6, ch) != tmp + 6) {
      ans = max(ans, i - prev);
      prev = i;
    }
    ++i;
  }
  ans = max(ans, int((st).size()) - prev);
  cout << ans << "\n";
  return 0;
}
