human
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?

Input

The only line of the input contains five integers t1, t2, t3, t4 and t5 (1 ≤ ti ≤ 100) — numbers written on cards.

Output

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

Examples

Input

7 3 7 3 20

Output

26

Input

7 9 3 1 8

Output

28

Input

10 10 10 10 10

Output

20

Note

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.
The above is tricky. Write me a correct solution in PYTHON3.
assistant
#Here is Python program to find the minimum sum of numbers on remaining cards.

#####################################   
import atexit, io, sys, collections, math, heapq, fractions,copy, os, functools 
import sys
import random
import collections
from io import BytesIO, IOBase
 
#####################################  python 3 START
BUFSIZE = 8192
 
class FastIO(IOBase):
    newlines = 0
 
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
 
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
 
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
 
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
 


ais = list(map(int, input().split()))
cc = collections.Counter(ais)
s = sum(ais)
ans = s
for k in cc:
    if cc[k] >= 2:
        ans = min(ans, s - 2*k)
    if cc[k] >= 3:
        ans = min(ans, s - 3*k)

print (ans)