#include using namespace std; #define MAX 100*1000+25*1000+1*1000 int memo[MAX+1]; int main() { // your code goes here int l,m,n; cin >>l >>m >>n; for(int i=0;i<=MAX;i++) memo[i] = 10000000; int hy = 0; int ty = 0; int oy = 0; for(int i=0;i<=1000;i++){ ty = hy; for(int j=0;j<=1000;j++){ oy = ty; for(int k=0;k<=1000;k++){ memo[oy] = memo[oy] > i+j+k ? i+j+k : memo[oy]; oy += 1; } ty+= 25; } hy+= 100; } int res = 1000000; for(int i=l*100+m*25+n; i>=0;i-=1000 ) res = memo[i] < res ? memo[i] : res; cout << res << endl; return 0; }