#include <bits/stdc++.h>
int main() {
  char word[100];
  scanf("%s", word);
  int i, max = 0, c = 1;
  for (i = 0; i < strlen(word); i++) {
    switch (word[i]) {
      case 'U':
      case 'A':
      case 'E':
      case 'O':
      case 'I':
      case 'Y':
        if (c > max) max = c;
        c = 1;
        break;
      default:
        c++;
        if (c > max) max = c;
    }
  }
  printf("%d\n", max);
  return 0;
}
