#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  int max = 0, counter = 0;
  for (int i = 0; i < str.length(); i++) {
    if (str[i] == 'A' || str[i] == 'E' || str[i] == 'I' || str[i] == 'O' ||
        str[i] == 'U' || str[i] == 'Y') {
      counter++;
      if (counter > max) max = counter;
      counter = 0;
    } else
      counter++;
  }
  counter++;
  if (counter > max) max = counter;
  cout << max;
}
