#include <bits/stdc++.h>
using namespace std;
int main() {
  int c = 1, mx = 0;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != 'A' && s[i] != 'O' && s[i] != 'I' && s[i] != 'U' &&
        s[i] != 'Y' && s[i] != 'E') {
      c++;
    } else {
      if (c > mx) mx = c;
      c = 1;
    }
  }
  if (c > mx) mx = c;
  cout << mx;
  return 0;
}
