Pregunta de entrevista de Epic

Complex math problem involving Negative number calculations.