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 ans = 0; m += n / 25; n -= n / 25 * 25; l += m / 4; m -= m / 4 * 4; l -= l / 10 * 10; ans += m + n + l; System.out.println(ans); } }