import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int L = sc.nextInt(); int M = sc.nextInt(); int N = sc.nextInt(); int sum = 100*L+25*M+N; int A = sum%1000; int B = A%100; int C = B%25; System.out.println(A/100 + B/25 + C); } }