#P304. 练51.1 向量点积计算

练51.1 向量点积计算

Description

In linear algebra and computational geometry, vector dot product is a very important operation.
Given two nn-dimensional vectors a=(a1,a2,a3,...,an)\vec{a}=(a_1,a_2,a_3,...,a_n) and b=(b1,b2,b3,...,bn)\vec{b}=(b_1,b_2,b_3,...,b_n), calculate their dot product a×b=a1b1+a2b2+a3b3+...+anbn\vec{a}×\vec{b}=a_1b_1+a_2b_2+a_3b_3+...+a_nb_n.

Input Format

The first line contains an integer nn (1n10001≤n≤1000);
The second line contains nn integers;
The third line contains nn integers;
Adjacent integers are separated by a single space. The absolute value of each integer does not exceed 10001000.

Output Format

Output the vector dot product.

Sample

7
7 8 9 4 8 7 8
3 7 4 7 9 9 7
332