Ah, Tenshi!
题号:NC232324
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
64bit IO Format: %lld

题目描述

Tenshi is a CS student in SUSTech with an initial coding level .


Tenshi meets  coders in the campus, the  of which has a coding level .

He can choose to challenge some or all of these N coders in any order he wants.

If his current coding level is greater than the coder he challenges, Tenshi's coding level will be increased by that coder's coding level.

Tenshi can challenge each coder at most once.


Tenshi would be grateful if you tell him the maximum coding level he can achieve.

输入描述:

The input consists of:

    One line containing two integers N, C seperated by a space.

    One line containing N integers  seperated by spaces.


输出描述:

Output a single integer indicating the maximum coding level Tenshi can achieve.
示例1

输入

复制
5 2
3 1 15 2 2

输出

复制
10