import java.util.Scanner; class No0032{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a100 = sc.nextInt(); int a025 = sc.nextInt(); int a001 = sc.nextInt(); if(a001 / 25 > 0){ a025 += a001 / 25; a001 %= 25; } if(a025 / 4 > 0){ a100 += a025 / 4; a025 %= 4; } if(a100 / 10 > 0){ a100 %= 10; } int result = a001 + a025 + a100; System.out.println(result); } }