#include <bits/stdc++.h>
const long double pie = 3.1415926535;
using namespace std;
long long fpow(long long n, long long p) {
  long long m = 1;
  while (p) {
    if (p % 2) m *= n;
    p >>= 1;
    n *= n;
  }
  return m;
}
long long mfpow(long long n, long long p, long long M) {
  long long m = 1;
  n %= M;
  while (p) {
    if (p % 2) m = (m * n) % M;
    n = (n * n) % M;
    p >>= 1;
  }
  return m % M;
}
const vector<long long> days = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
bool br1, br2, br;
char ch, ch1, ch2;
long long n, k, x, y, z, mini, maxi, l, ind, ini, sum, t, len, r, w, imini, m;
string s, s1, s2;
vector<long long> v;
vector<long double> v1;
bool b[(int)1e6 + 100];
void solve() {
  long double num;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> num;
    v1.push_back(num);
    if (ceil(num) == floor(num)) {
      b[i] = 1;
      v.push_back((long long)num);
    } else if (num > 0)
      v.push_back((long long)((num)));
    else
      v.push_back((long long)((num)));
    sum += (long long)(num);
  }
  for (long long i = 0; i < n; i++) {
    if (sum > 0 && v1[i] < 0 && b[i] == 0) {
      sum--;
      v[i]--;
    }
    if (sum < 0 && v1[i] > 0 && b[i] == 0) {
      sum++;
      v[i]++;
    }
  }
  for (auto i : v) cout << i << "\n";
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  solve();
  return 0;
}
