Rallods in Rednow Land
The challenge quiz:
The law on how tellers in the Central Bank of Haetaque should work is very strict. When there is a request to hand over money, a teller must first take notes from the sack containing notes of size 3 rallods only and then take notes from the sack with notes of size 5 rallods only. The teller cannot then come back to the sack with 3 rallods notes but he or she can take as many notes from either sack as he or she wishes provided there is at least one note taken from each sack.
One day, a customer came to the Central Bank and told a teller that he wished to withdraw X rallods from his account. After a while, the teller figured out how she should act to give the customer the exact amount he requested but she also discovered that there was ony one way she could do this. What is X? Find all possible solutions.