Why this code is printing 0 to 297 but not 0 to anything greater than 297?

As you can see, in this code , im just trying to print 0 to m . ive used exactly "m" as a variable.(ignone "n", the main thing is "m" here) if i input m = 5 ( accually i will type 4 to input "n" in my keyboard but ignore this , the "m" will be 5 ) .
so the code will print 0 1 2 3 4 5 . The problem i face is i can see 0 to m numbers perfectly only when m is 297 or less then 297. when i input m more than 297 , for example 500 . i can see numbers from 203 - 500 only . why i am not seeing 0 - 500?