Y by
There are coins in denominations of
and
doubloons, where
and
are given mutually prime natural numbers, with
. A non-negative integer
is called lucky if the sum in
doubloons can be scored with using no more than
coins. Find the number of lucky numbers.
From the folklore








From the folklore