import java.util.Scanner; class Yukicoder { static public void main(String[] args) { Scanner scanner = new Scanner(System.in); int L = scanner.nextInt(); int M = scanner.nextInt(); int N = scanner.nextInt(); if (L < 0 || L > 1000 || M < 0 || M > 1000 || N < 0 || N > 1000) System.exit(1); int sum = 100*L + 25*M + 1*N; sum = sum%1000; L = sum/100; sum = sum%100; M = sum/25; N = sum%25; sum = L + M + N; System.out.println(sum); } }