import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;

public class BacaAngkaBuffer {
    public static void main(String[] args) {
        try (BufferedReader br = new BufferedReader(
                new InputStreamReader(System.in, StandardCharsets.UTF_8))) {
            int total = 0;
            int jumlah = 0;
            String baris;

            while ((baris = br.readLine()) != null && !baris.equalsIgnoreCase("selesai")) {
                try {
                    total += Integer.parseInt(baris);
                    jumlah++;
                } catch (NumberFormatException e) {
                    System.out.println("Dilewati (bukan angka): " + baris);
                }
            }
            System.out.println("Jumlah angka: " + jumlah);
            System.out.println("Total       : " + total);
        } catch (IOException e) {
            System.out.println("Gagal membaca input: " + e.getMessage());
        }
    }
}
