{"problem":{"name":"Buy One Carton of Milk","description":{"content":"A supermarket sells egg packs. A pack of $6$ eggs costs $S$ yen, a pack of $8$ eggs costs $M$ yen, and a pack of $12$ eggs costs $L$ yen. When you can buy any number of each pack, find the minimum amo","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc331_b"},"statements":[{"statement_type":"Markdown","content":"A supermarket sells egg packs.\nA pack of $6$ eggs costs $S$ yen, a pack of $8$ eggs costs $M$ yen, and a pack of $12$ eggs costs $L$ yen.\nWhen you can buy any number of each pack, find the minimum amount of money required to purchase at least $N$ eggs.\n\n## Constraints\n\n*   $1 \\leq N \\leq 100$\n*   $1 \\leq S,M,L \\leq 10^4$\n*   All input values are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$ $S$ $M$ $L$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc331_b","tags":[],"sample_group":[["16 120 150 200","300\n\nIt is optimal to buy two $8$\\-egg packs."],["10 100 50 10","10\n\nIt is optimal to buy one $12$\\-egg pack."],["99 600 800 1200","10000\n\nIt is optimal to buy five $8$\\-egg packs and five $12$\\-egg packs."]],"created_at":"2026-03-03 11:01:14"}}