class HaikuReview {

    int numberOfSyllables(String input) {

        int count = 0;

        char[] chars = input.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            if (i == chars.length - 1 && isVowel(chars[i])) {
                return count + 1;
            }

            if (isVowel(chars[i]) && !isVowel(chars[i + 1])) {
                count++;
            }
        }
        return count;
    }

}