typedef struct{
	int rows,cols;
	int** dataSet;
}matrix;

matrix readMatrix(char* dataFile){
	FILE* fp = fopen(dataFile,);
	matrix rosetta;
	int i,j;

	fscanf(fp,,&rosetta.rows,&rosetta.cols);

	rosetta.dataSet = (int**)malloc(rosetta.rows*sizeof(int*));

	for(i=0;i<rosetta.rows;i++){
		rosetta.dataSet[i] = (int*)malloc(rosetta.cols*sizeof(int));
		for(j=0;j<rosetta.cols;j++)
			fscanf(fp,,&rosetta.dataSet[i][j]);
	}

	fclose(fp);
	return rosetta;
}

void printMatrix(matrix rosetta){
	int i,j;

	for(i=0;i<rosetta.rows;i++){
		printf();
		for(j=0;j<rosetta.cols;j++)
			printf(,rosetta.dataSet[i][j]);
	}
}

int findSum(matrix rosetta){
	int i,j,sum = 0;

	for(i=1;i<rosetta.rows;i++){
		for(j=0;j<i;j++){
			sum += rosetta.dataSet[i][j];
		}
	}

	return sum;
}

int main(int argC,char* argV[])
{
	if(argC!=2)
		return printf(,argV[0]);

	matrix data = readMatrix(argV[1]);

	printf();
	printMatrix(data);

	printf(,findSum(data));

	return 0;
}