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 grandmaster 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 java
.
Input Specification
A single string of lowercase letters that is up to characters long on a single line.
Output Specification
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
ilikejava
Sample Output 1
5
Sample Input 2
javaisbestlang
Sample Output 2
0
Sample Input 3
onehundredinenglishbtw
Sample Output 3
22
Comments
Although Syed like Java, but this question is easier to write in Python :)