#include <bits/stdc++.h>
using namespace std;
char str[105];
int main() {
  scanf("%s", str + 1);
  int len = strlen(str + 1);
  vector<int> vec;
  vec.push_back(0);
  int ans = 0;
  for (int i = 1; i <= len; ++i) {
    if (str[i] == 'A' || str[i] == 'E' || str[i] == 'I' || str[i] == 'O' ||
        str[i] == 'U' || str[i] == 'Y') {
      vec.push_back(i);
      ans = max(ans, i - vec[vec.size() - 2]);
    }
  }
  ans = max(ans, 1 + len - vec[vec.size() - 1]);
  printf("%d\n", ans);
  return 0;
}
