import java.util.*; import java.lang.*; import java.io.*; class Main { public static void main (String[] args) { // 入力値の読み込み Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int total =0; int d =0; int e =0; d = c/25; total += c%25; e = (b+d)/4; total += (b+d)%4; total += (a+e)%10; System.out.println(total); } }