#include <bits/stdc++.h>
using namespace std;
int main() {
  int ans = 1;
  int prev = -1;
  int a[1005] = {0};
  char vowel[10] = {'A', 'E', 'I', 'O', 'U', 'Y'};
  bool v = false;
  string s;
  cin >> s;
  int len = s.length();
  for (int i = 0; i < len; i++) {
    for (int j = 0; j <= 5; j++) {
      if (s[i] == vowel[j]) {
        v = true;
        a[i] = 1;
      }
    }
  }
  if (!v) {
    cout << len + 1;
    return 0;
  }
  for (int i = 0; i < len; i++) {
    if (a[i] == 1) {
      if (i - prev > ans) ans = i - prev;
      prev = i;
    }
  }
  if (len - prev > ans) ans = len - prev;
  cout << ans;
  return 0;
}
