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