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 to at most once discard 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?
The only line of the input contains five integers *t*<sub class="lower-index">1</sub>, *t*<sub class="lower-index">2</sub>, *t*<sub class="lower-index">3</sub>, *t*<sub class="lower-index">4</sub> and *t*<sub class="lower-index">5</sub> (1 ≤ *t*<sub class="lower-index">*i*</sub> ≤ 100) — numbers written on cards.
In the first sample, Limak has cards with numbers 7, 3, 7, 3 and 20. Limak can do one of the following.
 -  Do nothing and the sum would be 7 + 3 + 7 + 3 + 20 = 40. -  Remove two cards with a number 7. The remaining sum would be 3 + 3 + 20 = 26. -  Remove two cards with a number 3. The remaining sum would be 7 + 7 + 20 = 34. 
You are asked to minimize the sum so the answer is 26.

In the second sample, it's impossible to find two or three cards with the same number. Hence, Limak does nothing and the sum is 7 + 9 + 1 + 3 + 8 = 28.

In the third sample, all cards have the same number. It's optimal to discard any three cards. The sum of two remaining numbers is 10 + 10 = 20.
7 3 7 3 20
26
7 9 3 1 8
28
10 10 10 10 10
20
8 7 1 8 7
15
7 7 7 8 8
16
8 8 8 2 2
4
8 8 2 2 2
6
5 50 5 5 60
110
100 100 100 100 100
200
1 1 1 1 1
2
29 29 20 20 20
58
20 29 20 29 20
58
31 31 20 20 20
60
20 20 20 31 31
60
20 31 20 31 20
60
20 20 20 30 30
60
30 30 20 20 20
60
8 1 8 8 8
9
1 1 1 8 1
9
1 2 3 4 5
15
100 99 98 97 96
490
1 1 100 100 100
2
100 100 99 99 98
296
98 99 100 99 100
296
1 90 1 91 1
181
60 1 75 1 92
227
15 40 90 40 90
95
1 1 15 20 20
17
90 11 11 10 10
110
20 21 22 23 24
110
1 1 2 98 99
199
3 7 7 7 10
13
1 3 3 3 1
2
1 9 9 9 10
11
100 1 1 1 1
101
2 2 2 100 100
6
1 2 2 2 2
3
1 1 2 2 5
7
1 2 3 4 1
9
11 10 10 10 10
21
2 2 2 10 10
6
1 1 1 1 4
5
98 98 98 98 23
121
1 2 3 100 100
6
2 2 5 10 10
9
2 2 3 3 3
4
1 1 1 1 2
3
12 12 7 7 7
21
a = list(map(int,input().split()))
a.sort()
rem = 0
for i in range(5):
    if i+1 < 5 and a[i]==a[i+1]:
        rem = max(rem,2*a[i])
    if i+2 < 5 and a[i]==a[i+2]:
        rem = max(rem,3*a[i])
print(sum(a)-rem)