You can't fit 2^37 inside a long int. And I doubt you can fit 2^67 in a long long, either. You'll have to develop a way to handle longer numbers than the system provides (or work with someone else's).