#include <bits/stdc++.h>
int main() {
  char strng[101];
  int i, count = 1, max = 0, len;
  scanf("%s", strng);
  len = strlen(strng);
  for (i = 0; i < len; i++) {
    if (strng[i] != 'A' && strng[i] != 'E' && strng[i] != 'I' &&
        strng[i] != 'O' && strng[i] != 'U' && strng[i] != 'Y') {
      count = count + 1;
    } else {
      if (count > max) {
        max = count;
      }
      count = 1;
    }
  }
  if (count > max) max = count;
  printf("%d", max);
  return 0;
}
