Mir Mohammad is responsible for donating the cactus to the contest participants. n A group of participants turn to Amir Mohammad in order and ask him for a cactus.
My i category includes ai. If there are a maximum of 3 people, Amir Mohammad will give them a cactus according to the number of people; Otherwise it gives only one cactus to the whole bunch.
You are given the number of people in each category. For each category, you must indicate the number of cacti that Amir Mohammad gives them by typing the character โโ *.