{"problem":{"name":"Achieve the Goal","description":{"content":"Takahashi is taking exams on $N$ subjects. The score on each subject will be an integer between $0$ and $K$ (inclusive). He has already taken exams on $N-1$ subjects and scored $A_i$ points on the $i$","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc151_b"},"statements":[{"statement_type":"Markdown","content":"Takahashi is taking exams on $N$ subjects. The score on each subject will be an integer between $0$ and $K$ (inclusive).\nHe has already taken exams on $N-1$ subjects and scored $A_i$ points on the $i$\\-th subject.\nHis goal is to achieve the average score of $M$ points or above on the $N$ subjects.\nPrint the minimum number of points Takahashi needs on the final subject to achieve his goal.\nIf the goal is unachievable, print `-1` instead.\n\n## Constraints\n\n*   $2 \\leq N \\leq 100$\n*   $1 \\leq K \\leq 100$\n*   $1 \\leq M \\leq K$\n*   $0 \\leq A_i \\leq K$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $K$ $M$\n$A_1$ $A_2$ $...$ $A_{N-1}$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc151_b","tags":[],"sample_group":[["5 10 7\n8 10 3 6","8\n\nIf he scores $8$ points on the final subject, his average score will be $(8+10+3+6+8)/5 = 7$ points, which meets the goal."],["4 100 60\n100 100 100","0\n\nScoring $0$ points on the final subject still meets the goal."],["4 100 60\n0 0 0","\\-1\n\nHe can no longer meet the goal."]],"created_at":"2026-03-03 11:01:14"}}