{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point \u003ci\u003eN\u003c/i\u003e (0 ≤ \u003ci\u003eN\u003c/i\u003e ≤ 100,000) on a number line and the cow is at a point \u003ci\u003eK\u003c/i\u003e (0 ≤ \u003ci\u003eK\u003c/i\u003e ≤ 100,000) on the same number line. Farmer John has two modes of transportation: walking and teleporting.\u003c/p\u003e\u003cp\u003e* Walking: FJ can move from any point \u003ci\u003eX\u003c/i\u003e to the points \u003ci\u003eX \u003c/i\u003e- 1 or \u003ci\u003eX \u003c/i\u003e+ 1 in a single minute\u003cbr\u003e* Teleporting: FJ can move from any point \u003ci\u003eX\u003c/i\u003e to the point 2 × \u003ci\u003eX\u003c/i\u003e in a single minute.\u003c/p\u003e\u003cp\u003eIf the cow, unaware of its pursuit, does not move at all, how long does it take for Farmer John to retrieve it?\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"Line 1: Two space-separated integers: \u003ci\u003eN\u003c/i\u003e and \u003ci\u003eK\u003c/i\u003e"}},{"title":"Output","value":{"format":"HTML","content":"Line 1: The least amount of time, in minutes, it takes for Farmer John to catch the fugitive cow."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5 17\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e4\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"HTML","content":"The fastest way for Farmer John to reach the fugitive cow is to move along the following path: 5-10-9-18-17, which takes 4 minutes."}}]}