Create Christmas Gift

"It is always tricky, though very nice, choosing Christmas gifts.

This year, I think I'll give all my friends a "basket" of wine bottles. On account of this, I have come to constitute a beautiful wine cellar, taking advantage of promotions carried out by our large supermarkets. Now it is with great pleasure that will distribute by my friends at Christmas.

I have not decided how many bottles I will offer to each friend. One thing is certain: everyone will receive the same number of bottles. I do not want any of my friends feel that I like them less! Another certainty is that each will receive bottles all of the same brand. It would be very discourteous to offer a basket of various wines: it would seem that I was just wanting to get rid of my cellar.

I now have a problem to solve: if I decide to offer 3 bottles to every friend, how many baskets can I make with the bottles I have? And if instead of three bottles in each basket, I choose x bottles?

Task

Write a program that reads from the console the number of bottles in the basket (represented by x in the problem statement), then the number of bottles of each brand in my cellar until the end of the data, and computes and writes the number that baskets I can form."