#include <bits/stdc++.h>
using namespace std;
int f(char s) {
  if (s == 'A' || s == 'Y' || s == 'I' || s == 'U' || s == 'O' || s == 'E')
    return 1;
  return 0;
}
int main() {
  string s;
  int cur = 0, maxx = 0, pr = 0, ok = 0, t = 0;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (f(s[i])) {
      ok++;
      if (ok == 1) t = i;
      cur = i - pr;
      maxx = max(maxx, cur);
      pr = i;
    }
  }
  if (!ok) {
    cout << s.size() + 1;
    return 0;
  }
  int n = s.size();
  int d = n - pr;
  t++;
  cout << max(maxx, max(t, d));
  return 0;
}
