{"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\u003eIn the modern city of Noakhali, there lived a resourceful young techie named Ismail. Noakhali had recently launched its futuristic and eco-friendly Commut-a-Tron system, and Ismail was excited to make use of it for his daily work commute. However, he was determined to find the most cost-efficient way to travel while utilizing the Commut-a-Tron.\u003c/p\u003e\n\u003cp\u003eThe Commut-a-Tron system offered two types of tickets:\u003c/p\u003e\n\n\u003cp\u003e\u003cb\u003e1.Single Ride Ticket:\u003c/b\u003e A one-time use ticket that allowed a single journey and cost $$$X$$$ taka.\n\u003cp\u003e\u003cb\u003e2.Voyager Pass:\u003c/b\u003e A special pass that enabled $$$M$$$ rides and could be purchased multiple times, each pass costing $$$Y$$$ taka.\u003c/p\u003e\n\u003cp\u003e\nIsmail loved coding and decided to write a program to help him calculate the minimum amount of money he needed to spend to complete his required $$$N$$$ rides.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe single line of input consists of four space-separated integers: $$$N, M, X, $$$ and $$$ Y$$$. Each integer is in the range of $$$1 $$$ to $$$ 1000$$$, inclusive.\u003c/p\u003e\n\u003cp\u003eHere is the revised description:\u003c/p\u003e\n\u003cp\u003e∎ $$$N$$$ represents the total number of rides planned by the commuter.\u003cbr/\u003e\n∎ $$$M$$$ denotes the number of rides covered by the special ticket (Voyager Pass).\u003cbr/\u003e\n∎ $$$X$$$ indicates the price of a single-ride ticket.\u003cbr/\u003e\n∎ $$$Y$$$ signifies the price of the Voyager Pass ticket.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003ePrint a single integer — the minimum sum in taka that Ismail will need to spend.\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\u003e6 2 1 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\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\u003e5 2 2 3\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e8\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Sample 3","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 3 5 1\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"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003e\nOne of the optimal solutions in the given scenario is purchasing a Single Ride Ticket each time. However, there are alternative optimal solutions as well. For instance, he could choose to buy three $$$M$$$ ride tickets.\u003c/p\u003e"}}]}