You are playing a card game with a friend. For this game only the suit of the cards matters. The four suits are clubs, diamonds, hearts and spades, with the following values:
| Suit | Symbol | Value |
|---|---|---|
| Clubs | 1 | |
| Diamonds | 5 | |
| Hearts | 8 | |
| Spades | 14 |
Your friend selects a number , and you must show cards whose total value equals , by using the minimum possible number of cards. Assume that you have an unlimited number of cards of each suit.
Input consists of several cases, each one with a natural number between 0 and 500000. Input ends with a .
For every , print the corresponding result.
Author: Unknown
Translator: Carlos Molina
Generation: 2026-01-25T11:17:04.608Z
© Jutge.org, 2006–2026.
https://jutge.org