#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  s += "A";
  int max = 0;
  int x = -1;
  char ALPH[6] = {'A', 'E', 'I', 'O', 'U', 'Y'};
  int y = 0;
  for (int i = 0; i < s.size(); i++) {
    bool t = 1;
    for (int j = 0; j < 6; j++) {
      if (s[i] == ALPH[j]) {
        y++;
        if (y > max) max = y;
        y = 0;
        t = 0;
        break;
      }
    }
    if (t) y++;
  }
  if (max > y)
    cout << max;
  else
    cout << y;
  return 0;
}
