#include <bits/stdc++.h>
int main() {
  char abc[105];
  scanf("%s", abc);
  int n = strlen(abc);
  int i = 0;
  int max = 1, count = 0;
  while (i < n) {
    if (abc[i] == 'A' || abc[i] == 'E' || abc[i] == 'I' || abc[i] == 'O' ||
        abc[i] == 'U' || abc[i] == 'Y') {
      if (max < count + 1) max = count + 1;
      count = 0;
    } else
      count++;
    i++;
  }
  if (max < count + 1) max = count + 1;
  printf("%d", max);
}
