Replace the multiplications with bitwise operations: `offset2 = offset2 << 8`.