#include <bits/stdc++.h>
using namespace std;
int main() {
  string a;
  cin >> a;
  vector<int> pos;
  pos.push_back(0);
  for (size_t i = 0; i < a.size(); i++) {
    if (a[i] == 'A' || a[i] == 'E' || a[i] == 'I' || a[i] == 'O' ||
        a[i] == 'U' || a[i] == 'Y') {
      pos.push_back((int)i + 1);
    }
  }
  pos.push_back((int)a.size() + 1);
  int maxi = 0;
  for (size_t j = 0; j < pos.size() - 1; j++) {
    maxi = max(maxi, pos[j + 1] - pos[j]);
  }
  cout << maxi << endl;
}
