#include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
using P = pair<i64, i64>;
i64 mod = 1000000007;
int int_max = 2147483647;
i64 INF = 1e16;
int max_n = 1e5;
int main(int argc, char **argv) {
  i64 n;
  cin >> n;
  vector<i64> v(n + 1, 0), money(n + 1, 0), stock(n + 1, 0);
  for (int i = 1; i <= n; ++i) {
    cin >> v[i];
  }
  money[0] = 1000;
  for (int i = 1; i <= n - 1; ++i) {
    if (v[i] < v[i + 1]) {
      stock[i] += money[i - 1] / v[i];
      money[i] = money[i - 1] % v[i];
    } else {
      money[i] = money[i - 1] + stock[i - 1] * v[i];
      stock[i] = 0;
    }
  }
  money[n] = money[n - 1] + stock[n - 1] * v[n];
  cout << money[n] << endl;
  return 0;
}
