#include <bits/stdc++.h>
using namespace std;
int main() {
  int count = 1, max = 0;
  char s[101];
  cin >> s;
  for (int i = 0; i < strlen(s); i++) {
    if (s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' ||
        s[i] == 'U' || s[i] == 'Y') {
      if (count > max) max = count;
      count = 1;
    } else
      count++;
  }
  if (count > max)
    cout << count;
  else
    cout << max;
  return 0;
}
