Use something "sufficiently large" instead, perhaps int64_t
if you need the range of most modern general-purpose operating systems.
Of course, that'd probably mean you need to manually convert, to make it type-safe all the way, which might be costly if you're doing this for large vectors.