#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, n, j, k, flag, l, m, x, maxi;
  string s;
  cin >> s;
  l = s.length();
  maxi = -1;
  k = 0;
  m = 0;
  for (i = 0; i < l; i++) {
    if (s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' ||
        s[i] == 'U' || s[i] == 'Y') {
      m++;
    }
  }
  if (m == 0) {
    cout << l + 1 << endl;
  } else {
    x = 0;
    for (i = 0; i < l; i++) {
      if (s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' ||
          s[i] == 'U' || s[i] == 'Y') {
        x++;
        if (x == 1) {
          maxi = max(maxi, i - k + 1);
        } else {
          maxi = max(maxi, i - k);
        }
        k = i;
      }
    }
    cout << max(maxi, l - k) << endl;
  }
  return (0);
}
