import java.util.Scanner; class Question032 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int oh = scan.nextInt(); int tf = scan.nextInt(); int one = scan.nextInt(); tf += one/25; one = one%25; oh += tf/4; tf = tf%4; oh = oh%10; System.out.println(one+tf+oh); } }