import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { // long s = System.currentTimeMillis(); Main p = new Main(); // long e = System.currentTimeMillis(); // System.out.println((e-s)/1000.0); } public Main() { Scanner sc = new Scanner(System.in); int l = sc.nextInt(); int m = sc.nextInt(); int n = sc.nextInt(); solve(l, m, n); } public void solve(int l, int m, int n) { final int MAX = 100*1000+25*1000+1*1000; int[] dp = new int[MAX+1]; Arrays.fill(dp, 1000000); int y = 0; 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++){ // dp[oy] = Math.min(dp[oy], i+j+k); dp[oy] = dp[oy] > i+j+k ? i+j+k : dp[oy]; oy += 1; } ty+= 25; } hy+= 100; } int res = 1000000; for(int i=(l*100+m*25+n)%1000; i<=MAX;i+=1000 ) res =Math.min(res, dp[i]); System.out.println(res); } }