Suppose there are two different kinds of scoring evens, one of m points and other of n points and that (m,n) = 1. Derive formula for largest unattainable score and prove that formula is correct.

After playing around a bit with small numbers m and n such that (m,n) = 1, I came up with the formula mn-(n+m) for largest unattainable score. But I don't know how to prove it.