For ppl who don't know what modulo is. It's the number which can't be devided anymore.

4 modulo 3 is 1 : 3/3 and 1 remaing
5 modulo 3 is 2 : 3/3 and 2 remaing

Now i'm using a while loop each time subtracting a number, checking if it can be subtracted again and so on.