Killjee and LOL

0

0 votes
Very-Easy
Problem

After watching participation of students in this contest, Killjee was laughing badly. Suddenly he saw a string and wondered how many subsequence in string are "LOL". Killjee is busy laughing on the low participation of this contest can you solve this question for him.

You are given a string s you need to find number of sub-sequences "LOL" in the given string.

INPUT FORMAT
only line of input contains a single string s.Input string consists of upper-case english alphabets.

OUTPUT FORMAT
Output answer to the problem.

INPUT CONSTRAINTS

For 30% of data 1|s|100

For 60% of data 1|s|103

For 100% of data 1|s|106.

Sample Input
LLOL
Sample Output
2
Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?