{"raw_statement":[{"iden":"problem statement","content":"AtCoder Inc. sells merchandise through its [online shop](https://suzuri.jp/AtCoder/home).\nTakahashi has decided to purchase $N$ types of products from there.  \nFor each integer $i$ from $1$ to $N$, the $i$\\-th type of product has a price of $P_i$ yen each, and he will buy $Q_i$ of this.\nAdditionally, he must pay a shipping fee.  \nThe shipping fee is $0$ yen if the total price of the products purchased is $S$ yen or above, and $K$ yen otherwise.\nHe will pay the total price of the products purchased plus the shipping fee.  \nCalculate the amount he will pay."},{"iden":"constraints","content":"*   $1\\leq N\\leq 100$\n*   $1\\leq S\\leq 10000$\n*   $1\\leq K\\leq 10000$\n*   $1\\leq P_i\\leq 10000$\n*   $1\\leq Q_i\\leq 100$\n*   All input values are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $S$ $K$\n$P_1$ $Q_1$\n$P_2$ $Q_2$\n$\\vdots$\n$P_N$ $Q_N$"},{"iden":"sample input 1","content":"2 2000 500\n1000 1\n100 6"},{"iden":"sample output 1","content":"2100\n\nTakahashi buys one product for $1000$ yen and six products for $100$ yen each.  \nThus, the total price of the products is $1000\\times 1+100\\times 6=1600$ yen.  \nSince the total amount for the products is less than $2000$ yen, the shipping fee will be $500$ yen.  \nTherefore, the amount Takahashi will pay is $1600+500=2100$ yen."},{"iden":"sample input 2","content":"3 2000 500\n1000 1\n100 6\n5000 1"},{"iden":"sample output 2","content":"6600\n\nThe total price of the products is $1000\\times 1+100\\times 6+5000\\times 1=6600$ yen.  \nSince the total amount for the products is not less than $2000$ yen, the shipping fee will be $0$ yen.  \nTherefore, the amount Takahashi will pay is $6600+0=6600$ yen."},{"iden":"sample input 3","content":"2 2000 500\n1000 1\n1000 1"},{"iden":"sample output 3","content":"2000\n\nThere may be multiple products with the same price per item."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}