The program makes it clear as day. That was in my head but it's hard to work out by hand without that nifty modulus function.