#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int maxtime(int x) { return (x + 9) / 10 * 10; }
int remtime(int x) { return maxtime(x) - x; }
int main(void) {
  vector<int> A(5);
  for (int i = 0; i < (5); ++i) cin >> A[i];
  int sum = 0;
  for (int i = 0; i < (5); ++i) sum += A[i];
  sum -= *max_element(A.begin(), A.end());
  cout << sum << endl;
}
