Not sure what you mean, attached is a slightly modified version of your code and it's output as you can see (first line of the output) it "exactly" has 3600 elements, which would be utterly superrising if it didn't.
Have you tried increasing the declared integer size - integer(kind=8), or kind=16, or kind=32 or kind=64? You might have to use "selected_int_kind(r)" to work out the size of the integer or where it is going out of bounds.