Changed to long long, if this does not work then this will have to stay as a ruby implementation.