import java.util.*; 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; ans += (N % 25); M += (N / 25); ans += (M % 4); L += (M / 4); ans += (L % 10); System.out.println(ans); } }