int at(long x){
		long L=0, R=0;
		int k;
		for(k=17;k>=0;k--)if(endK[k] < x){
			L = ten[k];
			R = k==17?MAX_NUMBER:ten[k+1];
			break;
		}
		for(;;){
			long m = (R+L)/2;
			long p = endK[k]+1+(k+1)*(m-ten[k]);
			if(p<=x&&x<p+k+1){
				String s = m+"";
				for(int i=0;i<s.length();i++)if(p+i==x)return s.charAt(i)-'0';
			}
			else if(x < p)R=m;
			else L=m;
		}
	}