#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[120];
  int i, len, max, count;
  scanf("%s", str);
  len = strlen(str);
  for (i = 0, max = 1, count = 1; i < len; i++) {
    if (str[i] == 'A' || str[i] == 'E' || str[i] == 'I' || str[i] == 'O' ||
        str[i] == 'U' || str[i] == 'Y') {
      if (count > max) max = count;
      count = 1;
    } else
      count++;
  }
  if (count > max) max = count;
  printf("%d\n", max);
  return 0;
}
