#include<cstdio>
#include<cstdlib>
#include<iostream>

using namespace std;

int main(int argc, char* argv[])
{

	/*
	*	Serial version of the code. Initializes an 2 vectors and iteratively computes the dot product
	*/

	double result, *first_vector, *second_vector;
	int vector_size, i, j; 
	cin>>vector_size;

	first_vector = (double *) malloc(vector_size*sizeof(double));
	for (int i = 0; i < vector_size; ++i)
	{
		cin>>first_vector[i];	
	}



	second_vector = (double *) malloc(vector_size*sizeof(double));
	for (int i = 0; i < vector_size; ++i)
	{
		cin>>second_vector[i];
	}

	result = 0;
	
	for(i = 0; i < vector_size; i++)
	{
		result += first_vector[i]*second_vector[i];
	}

	cout<<"\nresult: ";
	cout<<result<<"";

	cout<<"\n";

	return 0;
}
