bool smaller(int x);
int find_number(int max) {
  int min = 1, v = 1;
  while(min < max) {
    int m = (min+max)/2;
    if(smaller(m)) {
      max = m;
    } else {
      v = m;
      min = m+1;
    }
  }
  return v;
}
