import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] dp = {1, 2, 5, 10, 20, 50, 100};
        int i = 0;
        while(i < dp.length && n - dp[i] >= 0) {
            n -= dp[i];
            i++;
        }
        System.out.printf("%d %d\n", i, i + n);
    }
}