Simply put, second number is too big. On a 64 bit system, the highest 64-bit signed integer you can store is 263 − 1 which equals to
9,223,372,036,854,775,807.
So a small comparison:
9,223,372,036,854,775,807
31,373,534,333,631,303,739
Your number is 3.5 times larger. Trying to store that big of a number would usually cause buffer overflow in some programming languages, but AutoIt caps it at its maximum value, which is 263 − 1 = 9,223,372,036,854,775,807. So that's why you're getting that specific number instead of 31,373,534,333,631,303,739.
Consider storing it as a string if you don't have to do math operations with it. Otherwise read about handling big numbers.