int main() {
    double val[5][5], sum = 0;
    for (int i = 0; i < 5; i++) {
        for (int j = 0; j < 5; j++) {
            scanf("%lf ", &val[i][j]);
            sum += val[i][j];
            printf("%.1f ", val[i][j]);
        }
        printf("%.1f \n", sum);
        sum = 0;
    }

    return 0;
}