import java.io.*; import java.util.*; class Main { static String s; static int[]zero,one; static int f(int a,int l,int r,int fs,int fe){ System.err.printf("enter f(%d,%d,%d,%d,%d)\n",a,l,r,fs,fe); if(fs>=fe){ fs=-1;fe=-1; } if(fs==-1){ int m=Integer.MAX_VALUE; int i1=Arrays.binarySearch(one,r); if(i1<0)i1=-i1-1; int i2=Arrays.binarySearch(one,l); if(i2<0)i2=-i2-1; if(i1==i2){ return 0; } int x=one[i2],y=one[i1-1]; if(x