#include <bits/stdc++.h>
using ll = long long;
using namespace std;
void solve() {}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    int m;
    cin >> m;
    a[i] = m;
  }
  int money = 1000;
  int kabu = 0;
  for (int j = 0; j < n - 1; j++) {
    if (a[j] > a[j + 1]) {
      bool q = true;
      for (int i = j + 1; i < n; i++) {
        if (a[i] > a[j]) {
          q = false;
        }
      }
      if (q) {
        money += kabu * a[j];
        kabu = 0;
        break;
      } else {
        money += kabu * a[j];
        kabu = 0;
      }
    } else if (a[j + 1] == a[j]) {
      continue;
    } else {
      kabu = money / a[j];
      money -= a[j] * kabu;
    }
  }
  money += kabu * a[n - 1];
  kabu = 0;
  cout << money << endl;
  ;
  return 0;
}
