#GD0000002. Nước ép hỗn hợp (Mix Juice)

Nước ép hỗn hợp (Mix Juice)

Mix Juice

Source: AtCoder

Version: Phuoc Hung OJ Extended

Problem Statement

A shop sells NN fruit types, and type ii costs pip_i. Choose exactly KK distinct types and buy one item of each. Find the minimum total price.

Input

The first line contains N,KN, K. The second line contains p1,…,pNp_1,\ldots,p_N.

Output

Print the minimum total price.

Subtasks

General constraints:

  • 1≤K≤N≤10001 \le K \le N \le 1000.

  • 1≤pi≤10001 \le p_i \le 1000.

  • Subtask 1 (20 points): N≤20N \le 20

  • Subtask 2 (30 points): N≤200N \le 200

  • Subtask 3 (50 points): No additional constraints.

Examples

Input

5 3
50 100 80 120 80

Output

210

Explanation

The three smallest prices are 50,80,8050,80,80, whose sum is 210210.