#include <bits/stdc++.h>
using namespace std;
long long n, m, k, i = 0, j, t, f, t1, t2, t3, t4, t5, r, l, c, s = 0,
                   sum = INT_MAX, cnt = 0, x, y, amt[100001], b[100001], g, z,
                   rem, mod, mx, mn;
string s1, s2, s3;
map<long long, long long> M;
map<long long, long long>::iterator it;
vector<pair<long long, long long> > v;
vector<long long> a, v1, v2, v3;
vector<long long> v4[51];
int main() {
  getline(cin, s1);
  stringstream second(s1);
  while (second >> n) a.push_back(n);
  for (i = 0; i < a.size(); i++) {
    s = s + a[i];
    M[a[i]]++;
  }
  mn = s;
  for (it = M.begin(); it != M.end(); it++) {
    if (it->second == 2)
      sum = s - (2 * (it->first));
    else if (it->second > 2)
      sum = s - (3 * (it->first));
    mn = min(mn, sum);
  }
  cout << mn;
  return 0;
}
