{"problem":{"name":"Cabbages","description":{"content":"Takahashi is visiting a shop specializing in cabbage. The shop sells cabbage for $X$ yen (Japanese currency) per head.   However, if you buy more than $A$ heads of cabbage at once, the $(A+1)$\\-th and","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc210_a"},"statements":[{"statement_type":"Markdown","content":"Takahashi is visiting a shop specializing in cabbage.\nThe shop sells cabbage for $X$ yen (Japanese currency) per head.  \nHowever, if you buy more than $A$ heads of cabbage at once, the $(A+1)$\\-th and subsequent heads will be sold for $Y$ yen per head.  \n(It is guaranteed that $Y \\lt X$. See Sample Input/Output 1 for clarity.)\nPrint the amount of money needed to buy $N$ heads of cabbage.\n\n## Constraints\n\n*   $1 \\leq N \\leq 10^5$\n*   $1 \\leq A \\leq 10^5$\n*   $1 \\leq Y \\lt X \\leq 100$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $A$ $X$ $Y$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc210_a","tags":[],"sample_group":[["5 3 20 15","90\n\nYou need to pay $20$ yen for each of the $1$\\-st through $3$\\-rd heads of cabbage, and $15$ yen for each of the $4$\\-th and $5$\\-th heads of cabbage.  \nThus, you need to pay a total of $20+20+20+15+15 = 90$ yen for the $5$ heads of cabbage."],["10 10 100 1","1000"]],"created_at":"2026-03-03 11:01:14"}}