Hi everyone my arduino is doing somthing weird

Your problem is solvable if you use code tags :smiley:

Please edit your post and place
** **[code]** **
before the code and
** **[/code]** **
after the code.

By the way, an int can store a maximum value of 32767 and a minimum value of -32768; definitely not one million.