minimal coin problem