#include <bits/stdc++.h>
using namespace std;
long long a, b, c, d, e, f, mn = 1e9, mx, cnt, bnt, bnt1, cnt1, sum;
string s, cal, kcal;
char ch;
set<char> st;
map<char, int> mp;
vector<int> vc, more, less0, less1;
int arr[105];
void botsolve() {}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> a >> b >> c;
  while (a--) {
    cin >> d;
    vc.push_back(d);
    cnt += d;
    mn = min(mn, d);
  }
  while (b--) {
    cin >> cnt1;
    more.push_back(cnt1);
    bnt += cnt1;
    mx = max(mx, cnt1);
  }
  for (int i = 0; i < (int)vc.size(); ++i) {
    for (int j = 0; j < (int)more.size(); ++j) {
      if (vc[i] < more[j]) bnt1++;
    }
  }
  if (bnt1 == 0)
    cout << c << '\n';
  else {
    f = c / mn;
    sum = c - (f * mn);
    cout << (f * mx) + sum << '\n';
  }
  cerr << "\nTime elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
  return 0;
}
