PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#SP0000052. Bi-shoe và Phi-shoe (Bi-shoe and Phi-shoe)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Bi-shoe và Phi-shoe (Bi-shoe and Phi-shoe)

Bi-shoe and Phi-shoe

Source: LightOJ

Version: Phuoc Hung OJ Extended

Problem Statement

There are nn students, and student ii has lucky number aia_i. Student ii must receive one bamboo pole of positive integer length LiL_i. The pole's score is φ(Li)\varphi(L_i), the number of positive integers less than LiL_i that are coprime to LiL_i. Require φ(Li)≥ai\varphi(L_i)\ge a_i. One unit of pole length costs one Xukha. Minimize the sum of costs of all nn poles.

Input

The first line contains nn. The second line contains nn integers a1,a2,…,ana_1,a_2,\ldots,a_n, in student order.

Output

Print the minimum total cost as an integer, followed by a space and the word Xukha.

Subtasks

  • Subtask 1 (20 points): 1≤n≤201\le n\le 20; 1≤ai≤1001\le a_i\le 100 for all 1≤i≤n1\le i\le n.
  • Subtask 2 (30 points): 1≤n≤10001\le n\le 1000; 1≤ai≤100001\le a_i\le 10000 for all 1≤i≤n1\le i\le n.
  • Subtask 3 (50 points): 1≤n≤100001\le n\le 10000; 1≤ai≤10000001\le a_i\le 1000000 for all 1≤i≤n1\le i\le n.

Examples

Input

3
1 2 4

Output

10 Xukha

Explanation

For lucky number 11, choose length 22 with φ(2)=1\varphi(2)=1. For lucky number 22, choose length 33 with φ(3)=2\varphi(3)=2. For lucky number 44, choose length 55 with φ(5)=4\varphi(5)=4. The total length is 2+3+5=102+3+5=10, so print 10 Xukha.