#include <bits/stdc++.h>
using namespace std;
long long t[100009];
int dp[100009];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%I64d", t + i);
  t[0] = -100000;
  dp[0] = 0;
  long long paid = 0;
  for (int i = 1; i <= n; i++) {
    long long cur = t[i];
    dp[i] = 20 + dp[i - 1];
    int prev90 = lower_bound(t, t + n + 1, cur - 90 + 1) - t;
    dp[i] = min(dp[i], 50 + dp[prev90 - 1]);
    int prevDay = lower_bound(t, t + n + 1, cur - 1440 + 1) - t;
    dp[i] = min(dp[i], 120 + dp[prevDay - 1]);
    int res = dp[i] - paid;
    paid = dp[i];
    printf("%d\n", res);
  }
}
