#include <bits/stdc++.h>
using namespace std;
const long long N = 1e9 + 7;
long long power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = ((res) * (x));
    res %= N;
    y = y >> 1;
    x = ((x) * (x));
  }
  return res;
}
long long powmod(long long a, long long b, long long n) {
  long long x = 1, y = a;
  while (b > 0) {
    if (b % 2 == 1) {
      x = (x * y) % n;
    }
    y = (y * y) % n;
    b /= 2;
  }
  return x % n;
}
bool sortbyval(pair<long long, long long> &p1, pair<long long, long long> &p2) {
  return p1.second < p2.second;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    long long n;
    cin >> n;
    vector<double> v(n);
    long long sum_n = 0, sum_p = 0;
    for (auto &i : v) {
      cin >> i;
      if (i < 0)
        sum_n += (long long)i;
      else
        sum_p += (long long)i;
    }
    double z = 0;
    if (sum_p + sum_n == 0) {
      for (auto i : v) cout << (long long)i << '\n';
    } else if (sum_p + sum_n > 0) {
      long long p = sum_p + sum_n;
      for (auto i : v) {
        if (i < 0 && i != (long long)i && p) {
          cout << floor(i) << '\n';
          p--;
        } else
          cout << (long long)i << '\n';
      }
    } else {
      long long p = (sum_p + sum_n);
      for (auto i : v) {
        if (i >= 0 && i != (long long)i && p) {
          cout << ceil(i) << '\n';
          p++;
        } else
          cout << (long long)i << '\n';
      }
    }
  }
  return 0;
}
