Cast to int() after checking for negatives