Change int to long to prevent overflow.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>