#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> to[100010];
bool visited[100010];
long long dist[100010];
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (a.size()); ++i) {
    cin >> a[i];
  }
  int money = 1000;
  for (int i = 0; i < (a.size() - 1); ++i) {
    if (a[i] < a[i + 1]) {
      int cnt = money / a[i];
      money += (a[i + 1] - a[i]) * cnt;
    }
  }
  cout << money << endl;
  return 0;
}
