You take the top number and divide by the bottom number.
For example, 1003=3313
The longer way(but simpler) is to subtract the bottom from the top until you can't.