#include <bits/stdc++.h>
using namespace std;
const double PI = atan(1.) * 4.;
const int maxn = 1e6 + 5;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const double e = 2.71828182845904523536;
int dir[4][2] = {1, 0, 0, 1, -1, 0, 0, -1};
double a[maxn];
int b[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  double d = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if ((a[i] - (int)a[i]) == 0) {
      b[i] = a[i];
    } else {
      if (a[i] > 0) {
        if (d > 0) {
          b[i] = (int)a[i];
          d -= a[i] - (int)a[i];
        } else if (d < 0) {
          b[i] = (int)a[i] + 1;
          d += (int)a[i] + 1 - a[i];
        } else {
          b[i] = (int)a[i];
          d -= a[i] - (int)a[i];
        }
      } else {
        if (d > 0) {
          b[i] = (int)a[i] - 1;
          d += (int)a[i] - 1 - a[i];
        } else if (d < 0) {
          b[i] = (int)a[i];
          d -= a[i] - (int)a[i];
        } else {
          b[i] = (int)a[i];
          d -= a[i] - (int)a[i];
        }
      }
    }
    cout << b[i] << "\n";
  }
  return 0;
}
