The first line contains six nonnegative integers separated with a space; these are the numbers of 10, 50, 100,500, 1000, and 5000 rouble notes the teacher gave to Aunt Frosya. In the second line you are given the priceof one ticket; it is a positive integer. All the integers in the input data do not exceed 1000.
,战胜困难,走出困境,成功就会属于你。