#include <bits/stdc++.h>
using namespace std;
char t[] = {'A', 'E', 'I', 'O', 'U', 'Y'};
bool unli(string a, int i) {
  for (int j = 0; j < 6; j++) {
    if (a[i] == t[j]) return true;
  }
  return false;
}
int main() {
  string a;
  cin >> a;
  a = 'A' + a + 'A';
  int Maxlen = 1, Lastlen = 0;
  for (int i = 0; i < a.length(); i++) {
    if (unli(a, i)) {
      if (Maxlen < i - Lastlen) Maxlen = i - Lastlen;
      Lastlen = i;
    }
  }
  cout << Maxlen;
  return 0;
}
