#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  cin >> s;
  int res = 1;
  int n = s.length();
  int cur = 1;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'A' or s[i] == 'E' or s[i] == 'I' or s[i] == 'O' or
        s[i] == 'U' or s[i] == 'Y') {
      res = max(cur, res);
      cur = 1;
    } else
      cur++;
  }
  res = max(cur, res);
  cout << res;
}
