Solved bytelandian gold coins problem