#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 998244353;
const int N = 1e6 + 5;
const int INF = 1e9 + 2;
void done() {}
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int d = 0;
  int total = n;
  vector<int> pos;
  for (int i = 0; i < n - 1; i++) {
  }
}
void another() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int cur = 1000;
  for (int i = 0; i < n - 1; i++) {
    long long stocks = 0;
    if (a[i] < a[i + 1]) stocks = cur / a[i];
    cur += (a[i + 1] - a[i]) * stocks;
  }
  cout << cur << '\n';
}
void test_case() {
  int t;
  cin >> t;
  while (t--) another();
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  another();
}
