{"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":"HTML","content":"\u003cp\u003eHere we go again with Loza and Bondok!\u003c/p\u003e\n\u003cp\u003eLoza and Bondok are two friends. Today is Loza\u0027s birthday so Bondok decided to visit her and give her a birthday gift but when he arrived he remembered that he forgot to buy the gift. To buy the gift Bondok will go to two stores near Loza\u0027s house before going to Loza\u0027s house. The distance between:\n\u003cul\u003e\n \u003cli\u003eLoza\u0027s house and first store is \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ed\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e1\u003c/sub\u003e\u003c/span\u003e\u003c/li\u003e\n \u003cli\u003eLoza\u0027s house and second store is \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ed\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e2\u003c/sub\u003e\u003c/span\u003e\u003c/li\u003e\n \u003cli\u003eTwo stores directly is \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ed\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e3\u003c/sub\u003e\u003c/span\u003e\u003c/li\u003e\n\u003c/ul\u003e \u003c/p\u003e\n\u003cp\u003eBondok wants to go to Loza as fast as possible so he wants you to help him take the shortest path to search for the gift in two store and go to Loza with the gift .\u003c/p\u003e\n\u003cp\u003eNote: \n\u003cul\u003e\n \u003cli\u003eBondok should go to the two store and return to Loza\u0027s house again with the gift .\u003c/li\u003e\n \u003cli\u003eShortest path : means minimum distance.\u003c/li\u003e\n\u003c/ul\u003e\u003c/p\u003e\n\u003cp\u003e\n\n\u003ccenter\u003e\u003cimg class\u003d\"tex-graphics\" height\u003d\"227px\" src\u003d\"CDN_BASE_URL/953a608d3fabd5e88879cc1c35fe4848?v\u003d1682472608\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\" width\u003d\"378px\"\u003e\n\u003c/center\u003e\n\u003cp\u003eBondok at first starts at Loza\u0027s house but without the gift. He should visit both stores moving only along the three existing roads to buy the gift and return back to Loza\u0027s house. He doesn\u0027t mind visiting the same store or passing the same road multiple times. The only goal is to minimize the total distance he will walk.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line of the input contains three integers \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ed\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e1\u003c/sub\u003e\u003c/span\u003e, \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ed\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e2\u003c/sub\u003e\u003c/span\u003e, \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ed\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e3\u003c/sub\u003e\u003c/span\u003e (\u003cspan class\u003d\"tex-span\"\u003e1 ≤ \u003ci\u003ed\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e1\u003c/sub\u003e, \u003ci\u003ed\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e2\u003c/sub\u003e, \u003ci\u003ed\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e3\u003c/sub\u003e ≤ 10\u003csup class\u003d\"upper-index\"\u003e8\u003c/sup\u003e\u003c/span\u003e)\u0026nbsp;— the lengths of the paths.\u003c/p\u003e\n\u003cul\u003e\n \u003cli\u003e\u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ed\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e1\u003c/sub\u003e\u003c/span\u003e is the length of the path between Loza\u0027s house and first store;\u003c/li\u003e\n \u003cli\u003e\u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ed\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e2\u003c/sub\u003e\u003c/span\u003e is the length of the path between Loza\u0027s house and second store;\u003c/li\u003e\n \u003cli\u003e\u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ed\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e3\u003c/sub\u003e\u003c/span\u003e is the length of the path between both stores.\u003c/li\u003e\n\u003c/ul\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003ePrint the distance of the shortest path - shortest path is declared above - that Bondok will take in order to visit both stores and return to Loza\u0027s house with the gift.\u003c/p\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\u003e10 20 30\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e60\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\u003e1 1 5\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e4\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\n\u003cp\u003eIn the first sample Bondok will take this path:\u003c/p\u003e\n\u003cul\u003e\n \u003cli\u003eLoza\u0027s house \u003cimg align\u003d\"middle\" class\u003d\"tex-formula\" src\u003d\"CDN_BASE_URL/52b688473c12f0f165b3714bc138002e?v\u003d1682472608\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e first store \u003cimg align\u003d\"middle\" class\u003d\"tex-formula\" src\u003d\"CDN_BASE_URL/52b688473c12f0f165b3714bc138002e?v\u003d1682472608\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e second store \u003cimg align\u003d\"middle\" class\u003d\"tex-formula\" src\u003d\"CDN_BASE_URL/52b688473c12f0f165b3714bc138002e?v\u003d1682472608\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e Loza\u0027s house .\u003c/li\u003e\n\u003c/ul\u003e \n\u003cp\u003eIn the second sample Bondok will take this path:\u003c/p\u003e\n\u003cul\u003e\n \u003cli\u003eLoza\u0027s house \u003cimg align\u003d\"middle\" class\u003d\"tex-formula\" src\u003d\"CDN_BASE_URL/52b688473c12f0f165b3714bc138002e?v\u003d1682472608\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e first store \u003cimg align\u003d\"middle\" class\u003d\"tex-formula\" src\u003d\"CDN_BASE_URL/52b688473c12f0f165b3714bc138002e?v\u003d1682472608\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e Loza\u0027s house\u003cimg align\u003d\"middle\" class\u003d\"tex-formula\" src\u003d\"CDN_BASE_URL/52b688473c12f0f165b3714bc138002e?v\u003d1682472608\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e second store \u003cimg align\u003d\"middle\" class\u003d\"tex-formula\" src\u003d\"CDN_BASE_URL/52b688473c12f0f165b3714bc138002e?v\u003d1682472608\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e Loza\u0027s house .\u003c/li\u003e\n\u003c/ul\u003e "}}]}