Y by
Let
be given pairwise coprime positive integers where
. Let
be positive integers. We call
to be a grandson of
if and only if, for all possible piles of stones whose total mass adds up to
and consist of stones with masses
, it's possible to take some of the stones out from this pile in a way that in the end, we can obtain a new pile of stones with total mass of
. Find the greatest possible number that doesn't have any grandsons.







