beecrowd | 1222

Short Story Competition

Maratona de Programação da SBC Brazil

Timelimit: 1

Machado wants to be a writer. He has written many short stories, book reviews, reports of trips he made, and a little romance. Now Machado wants to take part in a short story competition, which has very strict rules about the submission format. The rules of the competition limit the number of total pages, and specify the maximum number of characters per line, and the maximum number of lines per page. Additionally, each word must be written integrally in one line (ie, a word cannot be separated in two lines). Machado wants to write a story with as many words as possible within the rules of the contest, and needs your help. Given the maximum number of characters per line, the maximum number of lines per page, and the words of the short story that Machado is writing, he wants to know the minimum number of pages that his short story will ocuppy, considering the rules of the contest.

Input

The first line of a test case contains three integers N (2 ≤ N ≤ 1000), L (1 ≤ L ≤ 30 ) and C (1 ≤ C ≤ 70) , which indicate, respectively, the number of words of the short story, the maximum number of lines per page and the maximum number of characters per line. Machado’s short story is innovative and contains no characters besides upper and lower case letters and blanks. The second line contains Machado’s short story, consisting of N words (1 ≤ length of each word ≤ C) separated by exactly one blank space. The end of input is determined by EOF.

Output

For each test case your program must output a single line containing a single integer indicating the minimum number of pages the short story will ocuppy, considering the contest rules.

Sample Input Sample Output

14 4 20
Se mana Piedade tem casado com Quincas Borba apenas me daria uma esperanca colateral
16 3 30
No dia seguinte entrou a dizer de mim nomes feios e acabou alcunhando me Dom Casmurro
5 2 2
a de i de o
5 2 2
a e i o u

2
1
3
3