#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const int N = 2048;
const int M = 1e6 + 10;
const int inf = 1e17;
long long dp[M];
int a[M];
long long get(int i, int x) {
  x += 1;
  if (x <= 0) return 0;
  int k = lower_bound(a, a + i, x) - a;
  k--;
  return dp[k];
}
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) dp[i] = inf;
  a[0] = 0;
  dp[0] = 0;
  dp[1] = 20;
  cout << dp[1] << endl;
  for (int i = 2; i <= n; i++) {
    dp[i] = dp[i - 1] + 20;
    if (a[i] - a[i - 1] <= 90) dp[i] = min(dp[i], 50 + get(i, a[i] - 90));
    if (a[i] - a[i - 1] <= 1440) dp[i] = min(dp[i], 120 + get(i, a[i] - 1440));
    cout << dp[i] - dp[i - 1] << endl;
  }
  return 0;
}
