#include <bits/stdc++.h>
using namespace std;
const long long LLMAX = 2e18;
const int MOD = 1e9 + 7;
const double eps = 1e-8;
const int MAXN = 1e6 + 10;
const int hmod1 = 0x48E2DCE7;
const int hmod2 = 0x60000005;
inline long long sqr(long long x) { return x * x; }
inline int sqr(int x) { return x * x; }
inline double sqr(double x) { return x * x; }
long long __gcd(long long a, long long b) {
  return b == 0 ? a : __gcd(b, a % b);
}
long long qpow(long long a, long long n) {
  long long sum = 1;
  while (n) {
    if (n & 1) sum = sum * a % MOD;
    a = a * a % MOD;
    n >>= 1;
  }
  return sum;
}
inline int dcmp(double x) {
  if (fabs(x) < eps) return 0;
  return (x > 0 ? 1 : -1);
}
long long b[MAXN];
double a[MAXN];
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, sum = 0;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i], b[i] = floor(a[i]), sum += b[i];
  for (int i = 0; i < n; i++)
    if (sum < 0 && ceil(a[i]) == floor(a[i]) + 1) {
      sum++;
      b[i] = ceil(a[i]);
    }
  for (int i = 0; i < n; i++) cout << b[i] << endl;
  return 0;
}
