This is a classic numeric overflow problem. int (int32 to be exact) can store 32 bits, where the minimum is -231 (-2,147,483,648) and the maximum is 231-1 (2,147,483,647).
15003 would be 3,375,000,000, which does not fit into the range of int32. It would fit into uint32 (0..232, i.e. 0..4,294,967,296), or into int64, but the point is that there is always a limit where you cannot go any higher.
You could use a floating point type (e.g. float or double) that can work with much higher numbers by trading precision. (You can check out various data type limits here.)
So, you need to make a few decisions:
- do you want to handle overflow cases? How? Notify the user about it or just leave it as an error case (totally acceptable for toy projects)
- Is precision more important, or handling huge numbers (with approximation)?
- Is it worth introducing a limit to the user input to handle overflows gracefully? (e.g. do not let the user enter anything larger than the cubic root of 232 for an uint type, i.e. 1,625)
Good luck!