public static void main(String[] args) throws IOException {
		BufferedReader buf = new BufferedReader(
				new InputStreamReader(System.in));
		String line = "";
		StringBuilder sb = new StringBuilder();
		int f = 0;
		d: do {
			BigInteger aux = new BigInteger("0");
			line = buf.readLine();
			if(line==null || line.length()==0)
				break d;
			String[] nums = line.split(" ");
			String ans = binomial(Long.parseLong(nums[0]), Long.parseLong(nums[1])).toString();
			sb.append(ans.length()).append("\n");
		} while (line!=null && line.length()!=0);
		System.out.print(sb);
	}