import java.util.Scanner; class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int k = 0; int l = sc.nextInt(); int m = sc.nextInt(); int n = sc.nextInt(); m += n/25; n %= 25; l += m/4; m %= 4; k += l/10; l %= 10; System.out.println(l+m+n); } }