#include <bits/stdc++.h>
using namespace std;
int main() {
  char letters[] = {'A', 'E', 'I', 'O', 'U', 'Y'};
  string str;
  cin >> str;
  int lastLetter = -1;
  int maxDistance = 0;
  for (int i = 0; i < str.size(); i++) {
    if (find(begin(letters), end(letters), str[i]) != end(letters)) {
      if (i - lastLetter > maxDistance) maxDistance = i - lastLetter;
      lastLetter = i;
    }
  }
  maxDistance =
      std::max(maxDistance, static_cast<int>(str.size()) - lastLetter);
  cout << maxDistance;
}
