import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Bill {
    public static void main(String[] args) {
        BufferedReader br;
        int totalSum = 0;
        int partialSum = 0;
        String line = "";
        int price = 0;
        int priceLenght = 0;
        int pipePos = 0;
        int pipeCount = 0;

        try {
            br = new BufferedReader(new InputStreamReader(System.in));
            while ((line = br.readLine()) != null) {
                try {
                    Integer.parseInt("" + line.charAt(0));
                    for (int i = 0; i < line.chars().count(); i++) {
                        try {
                            Integer.parseInt(line.charAt(i) + "");
                            priceLenght++;
                        }
                        catch (Exception e) {
                            break;
                        }
                    }
                    pipePos = priceLenght + 2;
                    pipeCount = (int)line.substring(pipePos).chars().count();
                    totalSum += Integer.parseInt(line.substring(0, priceLenght)) * pipeCount;
                } catch (Exception e) {
                    totalSum += line.chars().count() * 42;
                }
                pipeCount = 0;
                pipePos = 0;
                price = 0;
                priceLenght = 0;
            }
        }
        catch (Exception e) {
            System.out.println(e.getMessage());
        }
        System.out.println(ceilTen(totalSum) + ",-");
    }

    private static int ceilTen(int totalSum) {
        double rounded = Double.parseDouble(Integer.toString(totalSum));
        rounded /= 10;
        rounded = Math.ceil(rounded);
        rounded *= 10;
        return (int) rounded;
    }
}

