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