#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
using PII = pair<int, int>;
const int64 INF = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1000000007;
const int MAXN = 200005;
int64 a[MAXN];
void run() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int ans = 1000;
  for (int i = 2; i <= n; i++) {
    if (a[i] > a[i - 1]) {
      ans = ans % a[i - 1] + ans / a[i - 1] * a[i];
    }
  }
  cout << ans << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  run();
}
