#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  double a[100001];
  int x[100001];
  int flag[100001];
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int j = 1;
  int s = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] - (int)a[i] == 0) {
      flag[j] = i;
      j++;
    }
  }
  j--;
  int num1 = 0, num2 = 0;
  for (int i = 1, k = 1; i <= n; i++) {
    if (i == flag[k]) {
      k++;
      x[i] = (int)a[i];
      s += x[i];
      continue;
    }
    if (a[i] < 0) {
      x[i] = floor(a[i]);
    }
    if (a[i] >= 0) {
      x[i] = ceil(a[i]);
    }
    s += x[i];
  }
  if (s > 0) {
    for (int i = 1, k = 1; i <= n; i++) {
      if (s == 0) break;
      if (i == flag[k]) {
        k++;
        continue;
      }
      if (x[i] > 0) {
        x[i]--;
        s--;
      } else
        continue;
    }
  } else if (s < 0) {
    for (int i = 1, k = 1; i <= n; i++) {
      if (s == 0) break;
      if (i == flag[k]) {
        k++;
        continue;
      }
      if (x[i] < 0) {
        x[i]++;
        s++;
      } else
        continue;
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << x[i] << endl;
  }
}
