#include <bits/stdc++.h>
using namespace std;
int n, m, r;
int dostane;
vector<int> v1, v2;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> r;
  for (int i = 0; i < n; i++) {
    int c;
    cin >> c;
    v1.push_back(c);
  }
  for (int i = 0; i < m; i++) {
    int c;
    cin >> c;
    v2.push_back(c);
  }
  sort(v1.begin(), v1.end());
  sort(v2.begin(), v2.end());
  reverse(v2.begin(), v2.end());
  while (true) {
    if (r >= v1[0] && v1[0] < v2[0]) {
      r -= v1[0];
      dostane += v2[0];
    } else
      break;
  }
  cout << r + dostane << "\n";
  return 0;
}
