George has a collection of old stamps. Some are worth 29 cents, the rest are worth a quarter. Their total value is $5.02. How many 29 cent stamps does George have?

Let $\displaystyle x$ be the number of 29 cents stamps and let $\displaystyle y$ be the number of 25 cents stamps. Then,

$\displaystyle 0.29x + 0.25y = 5.02$

Multiplying by 100 to rid the equation of decimals yields

$\displaystyle 29x + 25y = 502$

Solving for x yields

$\displaystyle x = \dfrac{502 - 25y}{29}$

I know $\displaystyle x$ is an integer, so $\displaystyle \dfrac{502 - 25y}{29}$ is also an integer. I also know $\displaystyle 502 - 25y$ is divisible by $\displaystyle 29$ (else $\displaystyle x$ isn't an integer). How would I use this knowledge to find $\displaystyle x$?