Changing map to "i," and "a,". Added "i;", "a;" which are useful inside 'for(int i=0; i <= n ; i++)'