{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":" \n \u003cdiv\u003e\n hkhv学长最近对二进制数很感兴趣,喜欢一切0和1组成的数。现在有一个十进制整数n,问你1到n之间有多少个数是只有0和1组成的类似二进制的数,输出他们的个数。\n \u003cbr\u003e \n \u003cdiv\u003e \n \u003cbr\u003e \n \u003c/div\u003e \n \u003c/div\u003e "}},{"title":"Input","value":{"format":"HTML","content":" \n \u003cdiv\u003e\n 多组输入数据,每组输入数据包含一个数n (1 \u0026lt;\u003d n \u0026lt;\u003d10^9). \n \u003c/div\u003e "}},{"title":"Output","value":{"format":"HTML","content":" \n \u003cdiv\u003e\n 输出1到n中类似二进制的数的个数. \n \u003c/div\u003e "}},{"title":"Sample Input","value":{"format":"HTML","content":" \u003cpre\u003e\n10\n11\n\u003c/pre\u003e "}},{"title":"Sample Output","value":{"format":"HTML","content":" \u003cpre\u003e\n2\n3\n\u003c/pre\u003e "}},{"title":"Hint","value":{"format":"HTML","content":" \u003cpre\u003e对于n \u003d 10,1 和 10是类似二进制的数.\n\u003c/pre\u003e "}}]}