#include <bits/stdc++.h>
using namespace std;
long long mx = -1e9, mn = 1e9 + 5;
long long T, n, m, k, ans, a[200005], b, c, d, l, sum, mid, coin, cnt, pos,
    number, x, y, z;
vector<long long> v, v1;
map<long long, long long> mp, mm;
map<long long, long long>::iterator it;
pair<long long, long long> p;
queue<long long> q;
priority_queue<long long> pq;
int main() {
  string s;
  cin >> s;
  x = -1;
  ans = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' ||
        s[i] == 'U' || s[i] == 'Y') {
      if (x == -1) {
        x = i;
        ans = max(ans, x + 1);
      } else {
        ans = max(ans, i - x);
        x = i;
      }
    }
  }
  if (x != -1) {
    y = s.size() - x;
    ans = max(ans, y);
  }
  if (x == -1) {
    ans = s.size() + 1;
  }
  cout << ans;
}
