Programming an Arduino Mega and a Mega Sensor Shield V2 for use in a Hexapod

So what doi replace INT with?

Did you try LONG LONG? How about LONG LONG LONG?

If you post the code, and links to all libraries, we won't have to guess.