#include <bits/stdc++.h>
using namespace std;
using namespace std;
const int N = 1e6 + 25;
void solve() {
  string s;
  int i;
  cin >> s;
  int n = s.length();
  int st = -1;
  int ans = 0;
  for (i = 0; i < n; i++) {
    if (s[i] == 'A' || s[i] == 'E' || s[i] == 'O' || s[i] == 'I' ||
        s[i] == 'U' || s[i] == 'Y') {
      ans = max(ans, i - st);
      st = i;
    }
  }
  ans = max(ans, n - st);
  cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
}
