#include <bits/stdc++.h>
using namespace std;
const int NUM = 1e9 + 7;
int binpow(int a, int b) {
  if (b == 0) return 1;
  int res = binpow(a, b / 2);
  res = res % NUM;
  if (b % 2)
    return (((res * res) % NUM) * a) % NUM;
  else
    return (res * res) % NUM;
}
struct hash_pair {
  template <class T1, class T2>
  size_t operator()(const pair<T1, T2>& p) const {
    auto hash1 = hash<T1>{}(p.first);
    auto hash2 = hash<T2>{}(p.second);
    return hash1 ^ hash2;
  }
};
int fact(int n);
int nCr(int n, int r) { return fact(n) / (fact(r) * fact(n - r)); }
int fact(int n) {
  int res = 1;
  for (int i = 2; i <= n; i++) res = (res * i) % NUM;
  return (res) % NUM;
}
int dif(int a, int b) {
  if (a > b) return a - b;
  return b - a;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int lcm(int a, int b) {
  int k = gcd(a, b);
  return (a * b) / k;
}
bool mycmp(pair<int, int> p1, pair<int, int> p2) { return p1.first > p2.first; }
void read(int arr[], int n) {
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
}
long long fact1(long long n, long long p) {
  long long pro = 1;
  for (long long i = (n - p + 1); i <= n; i++) {
    pro *= i;
    pro %= NUM;
  }
  long long z = fact(p);
  return pro / z;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    int n;
    cin >> n;
    float arr[n];
    pair<int, int> ans[n];
    long long sum = 0;
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
      if (ceil(arr[i]) == arr[i]) {
        ans[i].first = (int)arr[i];
        ans[i].second = 0;
      } else {
        if (arr[i] > 0) {
          ans[i].first = (int)ceil(arr[i]);
          ans[i].second = -1;
        } else {
          ans[i].first = (int)floor(arr[i]);
          ans[i].second = 1;
        }
      }
      sum += ans[i].first;
    }
    for (int i = 0; i < n && sum != 0; i++) {
      if (ans[i].second < 0 && sum > 0) {
        ans[i].first += ans[i].second;
        sum += -1;
      } else if (ans[i].second > 0 && sum < 0) {
        ans[i].first += ans[i].second;
        sum += 1;
      }
    }
    for (int i = 0; i < n; i++) {
      cout << ans[i].first << endl;
    }
  }
  return 0;
}
