# Linear Regression Large Values

I am trying to make a model that does simple counting (ex when I input 14, it outputs 15 or when I input 273 it outputs 274). OLS linear regression comes out to be the most accurate model, and it works really well for numbers with up to 7 digits. However, when I input a number that is more than 7 digits, (ex. 743829543), instead of returning the input +1, it will return a number that has the same first seven digits, but the other digits will be completely off. Is this just a function of the model? What can I do to fix this/what dataset can I use to train the model to get more accurate outputs?