#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[103];
  cin >> (a + 1);
  int l = strlen(a + 1);
  int Max = 0;
  int r = 0;
  for (int i = 1; i <= l; i++) {
    if (a[i] == 'A' || a[i] == 'E' || a[i] == 'I' || a[i] == 'O' ||
        a[i] == 'U' || a[i] == 'Y') {
      Max = max(Max, i - r);
      r = i;
    }
  }
  if (r == 0) {
    cout << l + 1 << endl;
    return 0;
  }
  if (r > 0) Max = max(Max, l + 1 - r);
  cout << Max << endl;
}
