import java.util.Scanner; public class Yuki8 { public static void main(String[] args) { final int m_1000yen = 1000; final int m_100yen = 100; final int m_25yen = 25; final int m_1yen = 1; Scanner scan = new Scanner(System.in); int l = scan.nextInt(); int m = scan.nextInt(); int n = scan.nextInt(); scan.close(); int total = (m_100yen * l) + (m_25yen * m ) + (m_1yen * n); int count = 0; if (total % m_1000yen != 0) { //千円はカウントに含めない //count += (total / m_1000yen); total = (total % m_1000yen); } if (total % m_100yen != 0) { count += (total / m_100yen); total = (total % m_100yen); } if (total % m_1yen != 0) { count += (total / m_25yen); total = (total % m_25yen); } count += (total / m_1yen); total = (total % m_1yen); System.out.println(count); } }