You are experiencing an overflow error. The number in the
multiplication is larger than the maximum a normal int can hold. It
goes negative due to 2's complement notation. By splitting the
multiplications, you keep the products in an int's range until it can
be stored in a long, at which point the maximum is bumped up.