#include <bits/stdc++.h>
using namespace std;
bool comp(pair<int, int> a, pair<int, int> b) {
  if (a.second == b.second) return a.first < b.first;
  return a.second < b.second;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  double a[n];
  long long int b[n], c[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = floor(a[i]);
    c[i] = ceil(a[i]);
  }
  long long int ans[n];
  long long int sum = 0;
  for (int i = 0; i < n; i++) {
    sum += b[i];
    ans[i] = b[i];
  }
  if (sum == 0) {
    for (int i = 0; i < n; i++) cout << ans[i] << endl;
  }
  if (sum > 0) {
    long long int sum1 = sum;
    for (int i = 0; i < n; i++) {
      if (c[i] - b[i] == -1) {
        sum1--;
        ans[i] = c[i];
      }
      if (sum1 == 0) break;
    }
    for (int i = 0; i < n; i++) cout << ans[i] << endl;
  }
  if (sum < 0) {
    long long int sum1 = sum;
    for (int i = 0; i < n; i++) {
      if (c[i] - b[i] == 1) {
        sum1++;
        ans[i] = c[i];
      }
      if (sum1 == 0) break;
    }
    for (int i = 0; i < n; i++) cout << ans[i] << endl;
  }
  return 0;
}
