{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"MD","content":"You shut down your computer and glanced at your desk calendar. It was January 23, 2120. Your company, HireAndFire, was five years old. You had **N** employees, including some terrific designers and developers who spent their days improving and evolving the products that your company produced. As the founder and CEO, one might think you were focused on strategic growth. Maybe surrounded by spreadsheets and acquisition charts and high-level financial meetings. The reality? You were doing customer support - all day long. From the moment you sat down at my computer until the end of the workday, you answered hundreds of emails and customer questions. And it was just you. You were a support department of one. As you locked up the office on that cold day in January, you knew something needed to change. You had built HireAndFire without any funding or investments. You took pride in your slow and steady climb, but this was getting ridiculous. You placed a job ad the very next day. By the end of 2120, your office had a total of **M** employees.\n\nNow, the hiring process in HireAndFire is not that simple. You follow two types of operations repeatedly to change the number of employees in your office:\n- Fire one employee\n- Double the number of employees\n\nFor each operation you perform, you need to place one job ad in job posting sites which costs money. To save money, you want to place as few ads as possible. Now given the current number of employees and the number of employees you want to achieve, can you find the minimum number of ads required?"}},{"title":"Input","value":{"format":"MD","content":"Input consists of two space-separated integers **N** and **M (1 ≤ N, M ≤ 10\u003csup\u003e4\u003c/sup\u003e)** — the current number of employees and the expected number of employees, respectively."}},{"title":"Output","value":{"format":"MD","content":"Print a single number — the minimum number of ads required."}},{"title":"Sample Input","value":{"format":"MD","content":"`4 7`"}},{"title":"Sample Output","value":{"format":"MD","content":"`2`"}},{"title":"Explanation","value":{"format":"MD","content":"Currently you have 4 employees. First you double the number of employees and then fire one to get 7 employees at your office. This requires 2 ads."}}]}