{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\n\u003cdiv class\u003d\"markdown texable\"\u003e\n \u003cp\u003eIn arithmetic expression you are allowed to use the number \u003cstrong\u003e1\u003c/strong\u003e, operations of addition, multiplication and parenthesis. What is the minimum number of ones you need to obtain the positive integer \u003cstrong\u003en\u003c/strong\u003e?\u003c/p\u003e\n \u003ch4\u003eInput\u003c/h4\u003e\n \u003cp\u003eOne number \u003cstrong\u003en\u003c/strong\u003e (\u003cstrong\u003e1\u003c/strong\u003e ≤ \u003cstrong\u003en\u003c/strong\u003e ≤ \u003cstrong\u003e5000\u003c/strong\u003e).\u003c/p\u003e\n \u003ch4\u003eOutput\u003c/h4\u003e\n \u003cp\u003eThe required number of ones.\u003c/p\u003e\n\u003c/div\u003e"}},{"title":"Sample 1","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 class\u003d\"eo-code\" id\u003d\"example-input-1\"\u003e7\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre class\u003d\"eo-code\" id\u003d\"example-output-1\"\u003e6\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Sample 2","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 class\u003d\"eo-code\" id\u003d\"example-input-17\"\u003e119\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre class\u003d\"eo-code\" id\u003d\"example-output-17\"\u003e15\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Explanation","value":{"format":"HTML","content":"Example description: \u003cbr\u003e\nSample 1 : 7 \u003d (1 + 1 + 1) * (1 + 1) + 1"}}]}