#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  int jump = 0;
  int i = -1;
  int j = 0;
  while (s[j]) {
    if ((s[j] == 'A' || s[j] == 'E' || s[j] == 'U' || s[j] == 'I' ||
         s[j] == 'O' || s[j] == 'Y')) {
      if (jump < j - (i)) {
        jump = j - (i);
      }
      i = j;
    }
    j++;
  }
  if (jump < (j - i)) jump = j - i;
  cout << jump;
  return 0;
}
