#include <bits/stdc++.h>
using namespace std;
string s;
map<long long int, long long int> ma;
long long int arr[200005], res[200005];
int main() {
  long long int i, j, k, l, z, step = 0, n, m = -3, ass, t, w, r = -1, x, y,
                               c = 0, f = 0;
  cin >> s;
  l = s.length();
  for (i = 0; i < l; i++) {
    if (s[i] == 'A' || s[i] == 'O' || s[i] == 'I' || s[i] == 'E' ||
        s[i] == 'U' || s[i] == 'Y') {
      r = i;
      break;
    }
  }
  if (r == -1) {
    cout << l + 1;
    return 0;
  }
  m = r + 1;
  for (i = r + 1; i < l; i++) {
    if (s[i] == 'A' || s[i] == 'O' || s[i] == 'I' || s[i] == 'E' ||
        s[i] == 'U' || s[i] == 'Y') {
      m = max(m, i - r);
      r = i;
    }
  }
  if (m == -3) {
    cout << max(r + 1, l - r);
  } else
    cout << max(m, l - r);
  return 0;
}
