Pair Complex
题号:NC206678
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Given nonnegetive interger sequences a,b of length n .

Let



You need to calculate

输入描述:

The first line of the input contains a single interger number n  .

The second line of the input contains n interger numbers , which are separated by spaces.

The third line of the input contains n interger numbers , which are separated by spaces.

输出描述:

Print a single interger number ans .
示例1

输入

复制
2
1 2
2 1

输出

复制
9