#include <bits/stdc++.h>
using namespace std;
clock_t time_p = clock();
void time_taken() {
  time_p = clock() - time_p;
  cerr << "Time Taken : " << (float)(time_p) / CLOCKS_PER_SEC << "\n";
}
const long long mod = 1e9 + 7;
const long long INF = 1e18;
const int maxn = 1e5 + 5;
int dp[100][maxn];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int money = 1000;
  int stocks = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      stocks += money / a[i];
      money %= a[i];
    } else {
      money += stocks * a[i];
      stocks = 0;
    }
  }
  money += stocks * a[n - 1];
  cout << money << '\n';
  time_taken();
  return 0;
}
