import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No32 { public static void main(String[] args) throws IOException{ //貯金箱の憂鬱 BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int L = Integer.parseInt(br.readLine()) , M = Integer.parseInt(br.readLine()) , N = Integer.parseInt(br.readLine()); br.close(); M += (int)(N / 25); L += (int)(M / 4); System.out.println((L % 10) + (M % 4) + (N % 25)); } }