#include using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int price = 0; int rest = a+b; while (rest>c) { if (rest>b) price += 1; else price += 10; rest--; } cout << price << endl; return 0; }