#bzoj3560. DZY Loves Math V

DZY Loves Math V

Title Description

Given nn positive integers a1,a_1, a_2,..., ana_n , find the value of it.(Answer modmod 109+710 ^ 9+7) image1

Input format

The first line is a positive integer nn.

Next nn lines, each line contains a positive integer, namely a1,a_1, a_2,..., ana_n.

Output format

Only one line of answer.

Example

3
6
10
15
1595

Data scope and agreement

1n105,1ai1071\le n\le 10^5,1\le a_i\le 10^7, There are a total of 3 sets of data.