#include <bits/stdc++.h>
using namespace std;
int main() {
  string khat;
  cin >> khat;
  int n = 0, m = 0;
  for (int r = 0; r < khat.size(); r++) {
    if ((khat[r] == 'A') || (khat[r] == 'E') || (khat[r] == 'I') ||
        (khat[r] == 'O') || (khat[r] == 'U') || (khat[r] == 'Y')) {
      n = 0;
    } else {
      n++;
      if (n > m) {
        m = n;
      }
    }
  }
  m++;
  cout << m << endl;
  return 0;
}
