Make it and everything that does math with it into 32-bit type long that can hold +/- 2 billion.
Okay thanks
I'd salt in some serial prints to see what's going on with the variables
When trying to salt in same serial prints the displaying on the matrix stops working and no line is printed on the serial monitor(out of Ram?)