// Arup Guha
// 5/28/2016
// Solution to 2014 NCNA Problem D: Server

import java.util.*;

public class server {

    public static void main(String[] args) {

        Scanner stdin = new Scanner(System.in);
        int loop = 1;

        // Process each case.
        while (stdin.hasNext()) {

            // Initalize variables.
            int n = stdin.nextInt();
            int max = stdin.nextInt();
            int res = 0, sum = 0;

            // Simulate.
            for (int i=0; i<n; i++) {
                int item = stdin.nextInt();
                sum += item;
                if (sum <= max) res++;
            }

            // Output and go to next case.
            System.out.println("Case "+loop+": "+res);
            loop++;
        }
    }
}
