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