#OLD123. Bear and Five Cards

Bear and Five Cards

Description

A little bear Limak plays a game. He has five cards. There is one number written on each card. Each number is a positive integer.

Limak can discard (throw out) some cards. His goal is to minimize the sum of numbers written on remaining (not discarded) cards.

He is allowed toat most oncediscard two or three cards with the same number. Of course, he won't discard cards if it's impossible to choose two or three cards with the same number.

Given five numbers written on cards, cay you find the minimum sum of numbers on remaining cards?

小熊该玩游戏。他有五张牌。每张卡片上都写着一个数字。每个数字都是正整数。
该可以丢弃(抛弃)一些卡片。他的目标是最小化剩余(未丢弃)卡片上写的数字总和。
他被允许最多一次弃两或三卡相同的号码。当然,如果不可能选择两张或三张相同号码的牌,他就不会弃牌。
给出五个数写在卡片上,你能否找到剩下的卡数和最小?

Format

Input

The only line of the input contains five integerst1,t2,t3,t4andt5(1 ≤ti≤ 100) — numbers written on cards.

Output

Print the minimum possible sum of numbers written on remaining cards.

Samples

7 3 7 3 20
26

Hint