#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int N = 2000000;
const int M = 2000;
void Run() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long a[N];
int main() {
  Run();
  int n;
  cin >> n;
  long long ans = 1000;
  vector<int> a(n);
  int st = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (int i = 0; i < n; ++i) {
    if (st > 0) {
      ans += st * a[i];
      st = 0;
    }
    if (i != n - 1 && a[i] < a[i + 1]) {
      st = ans / a[i];
      ans -= ans / a[i] * a[i];
    }
  }
  cout << ans << '\n';
}
