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