#include <bits/stdc++.h>
using namespace std;
const long long int INF = 10000000000;
const double PI = acos(-1);
const long long int mod = 1000000007;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  vector<int> updown(n);
  for (int i = 0; i < n - 1; i++) {
    if (a[i + 1] > a[i])
      updown[i] = 1;
    else if (a[i + 1] == a[i])
      updown[i] = 0;
    else
      updown[i] = -1;
  }
  updown[n - 1] = -1;
  int ans = 1000;
  int stock = 0;
  for (int i = 0; i < (n); i++) {
    if (updown[i] == 1) {
      int num = ans / a[i];
      ans -= a[i] * num;
      stock += num;
    } else if (updown[i] == -1) {
      ans += stock * a[i];
      stock = 0;
    }
  }
  cout << ans << endl;
  return 0;
}
