e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Competitions

Programming Principles 1. Week 6. October 7 - 13. PART 1

The length of the substring

Lets start the numbering of characters in the string from 1. The substring S[i..j] is a sequence of characters that begins in position і and ends in position j. For given indexes і and j print the length of substring and all the characters of this substring not violating their order in the string.

Input

First line contains string S, which length is no more than 100. Second line contains two indexes i and j (1іj ≤ size(S), where size(S) is the length of the string).

Output

In the first line print the length of the substring. In the second line print all characters of substring in the same order like in the string S.

Time limit 1 second
Memory limit 128 MiB
Input example #1
abracadabra
2 5
Output example #1
4
brac