#include <bits/stdc++.h>
using namespace std;
using in = int64_t;
const double PI = 3.14159265358979323846;
const in MOD = 1000000007;
const in INF = 1e18 + 7;
const int inf = 1e9 + 7;
const vector<int> dx = {1, 0, -1, 0};
const vector<int> dy = {0, 1, 0, -1};
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a.at(i);
  int x = 1000;
  int y = 0;
  for (int i = 0; i < (int)(n - 1); i++) {
    if (a.at(i) < a.at(i + 1)) {
      y += x / a.at(i);
      x -= y * a.at(i);
    }
    if (a.at(i) > a.at(i + 1)) {
      x += a.at(i) * y;
      y = 0;
    }
  }
  x += a.at(n - 1) * y;
  cout << x << endl;
}
