Range of m not given in the problem spoj GSS1

What is the constraint for m in the problem?

@govilayush, yeah you are right since i have solved this question so i can say that its in the range of 10^5