Use static method. Added boundary checks. Reverse the result sign to handle MIN_VALUE value.