Syed likes Java. In fact, he likes Java so much, that he can't help but try to insert it into everything he writes. Syed has typed out a string of lowercase characters for his essay - since he is such a grand master at writing English essays, he does not need ridiculous things like correct grammar, spaces, capitalization, or any form of punctuation to communicate his incredibly deep ideas. Find the number of characters before the first letter of the first occurrence of the substring
A single string of lowercase letters that is up to ~1\,000~ characters long on a single line.
The number of characters before the first letter of the first occurrence of the substring
java. If the substring
java does not occur, output the length of the string instead.
Sample Input 1
Sample Output 1
Sample Input 2
Sample Output 2
Sample Input 3
Sample Output 3