"use strict"

function main(input) {

	let total = [];
	let sum = 0
	let ary = input.split('\n')
	for(let i=1;i<ary.length;i++)
	{
		sum = 0
		let ary2 = ary[i].split(' ')
		for(let n=0;n<ary2.length;n++)
		{

			sum += parseInt(ary2[n], 10)

		}
		total.push(sum)

	}
	console.log(total[0]*total[1]*total[2])





}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));