#include <bits/stdc++.h>
using namespace std;
int main() {
  int x = 0;
  int max = 0;
  string A;
  cin >> A;
  if (A.length() <= 100) {
    int i = 0;
    while (i < A.length() + 1) {
      if (A[i] == 'A' || A[i] == 'O' || A[i] == 'U' || A[i] == 'I' ||
          A[i] == 'E' || A[i] == 'Y') {
        x++;
        if (x > max) {
          max = x;
        }
        x = 0;
      } else {
        x++;
        if (x > max) max = x;
      }
      i++;
    }
  }
  cout << max;
}
