2022 AIME II Problem 14

For positive integers a, b, and c with a<b<c, consider collections of postage stamps in denominations a, b, and c cents that contain at least one stamp of each denomination. If there exists such a collection that contains sub-collections worth every whole number of cents up to 1000 cents, let f(a, b, c) be the minimum number of stamps in such a collection. Find the sum of the three least values of c such that f(a, b, c)=97 for some choice of a and b.