import java.util.Scanner; public class PiggyBank { public static void main(String[] args) { int l; int m; int n; Scanner scanner = new Scanner(System.in); l = scanner.nextInt(); m = scanner.nextInt(); n = scanner.nextInt(); // 1 -> 25 int twentyF = n / 25; int amari1 = n % 25; // 25 -> 100 int oneH = (m+twentyF) / 4; int amari2 = (m+twentyF) % 4; // 100 -> 1000 int oneT = (l+oneH) / 10; int amari3 = (l+oneH) % 10; System.out.println(amari1 + amari2 + amari3); } }