import java.util.*; public class changeMoney { public static void main(String[] args) { Scanner sn = new Scanner(System.in); int h = sn.nextInt(); int t = sn.nextInt(); int w = sn.nextInt(); int count = h + t + w; sn.close(); if(w >= 25){ w = w/25 + w%25; t += w/25; }else if(t >= 4){ t = t/4 + t% 4; h += t/4; }else if(h >= 10){ h = h/10 + h%10; }else{ System.out.println(count); } } }