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