public int sqrt_BS(int x) {
		if(x <= 0) return 0;
		if(x == 1) return 1;
		
		int start = 1, end = x / 2;
		while(start <= end) {
			int mid = (start + end) / 2;
			if(mid == x / mid) return mid;
			else if(mid > x / mid) end = mid - 1;
			else start = mid + 1;
		}
		
		return end;
	}