#include <bits/stdc++.h>
char _;
using namespace std;
void PRINT(int x, int y) {
  for (int i = y - 1; i >= 0; i--) {
    cout << ((0u == (x & (1 << i))) ? 0u : 1u);
  }
  cout << endl;
}
vector<string> vec_splitter(string s) {
  s += ',';
  vector<string> res;
  while (!s.empty()) {
    res.push_back(s.substr(0, s.find(',')));
    s = s.substr(s.find(',') + 1);
  }
  return res;
}
void debug_out(vector<string> __attribute__((unused)) args,
               __attribute__((unused)) int idx,
               __attribute__((unused)) int LINE_NUM) {
  cerr << endl;
}
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) {
  if (idx > 0)
    cerr << ", ";
  else
    cerr << "Line(" << LINE_NUM << ") ";
  stringstream ss;
  ss << H;
  cerr << args[idx] << " = " << ss.str();
  debug_out(args, idx + 1, LINE_NUM, T...);
}
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  int a[100] = {0};
  for (int x = 1; x <= n; x++) {
    cin >> a[x];
  }
  int y = 1000, s = 0;
  for (int x = 1; x <= n; x++) {
    if (x == n) {
      y += s * a[x];
      continue;
    }
    bool l = false, g = false;
    for (int i = x + 1; i <= n; i++) {
      if (a[i] > a[x]) {
        g = true;
        break;
      } else if (a[i] < a[x]) {
        l = true;
        break;
      }
    }
    if (g) {
      s += y / a[x];
      y -= (y / a[x]) * a[x];
    } else if (l) {
      y += s * a[x];
      s = 0;
    }
  }
  cout << y << "\n";
  return 0;
}
