#include <bits/stdc++.h>
using namespace std;
map<char, bool> a;
int main() {
  a['E'] = a['Y'] = a['U'] = a['I'] = a['O'] = a['A'] = true;
  string second;
  cin >> second;
  int ans = 0;
  int dl = -1;
  for (int i = 0; i < second.size(); i++) {
    if (a[second[i]]) {
      if (dl == -1)
        ans = i + 1;
      else
        ans = max(ans, i - dl);
      dl = i;
    }
  }
  ans = max(ans, (int)second.size() - dl);
  cout << ans;
}
