#include <bits/stdc++.h>
using namespace std;
void debug_out() { cerr << endl; }
void clock_out() {
  cerr << "\nTime Elapsed : " << 1.0 * clock() / CLOCKS_PER_SEC << " s\n";
}
void fileio() {
  freopen("/home/dwai/Desktop/cp/input.txt", "r", stdin);
  freopen("/home/dwai/Desktop/cp/output.txt", "w", stdout);
  freopen("/home/dwai/Desktop/cp/debug.txt", "w", stderr);
}
void ofileio() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
}
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << H;
  debug_out(T...);
}
int IT_MAX = 1 << 20;
const long long MOD = 1000000007;
const int INF = 0x3f3f3f3f;
const long long LL_INF = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1);
const double ERR = 1e-10;
const double eps = 1e-6;
void solve() {
  long long n;
  cin >> n;
  long long a[n][2];
  long long i;
  long long sm = 0;
  for (i = 0; i < n; i++) {
    double x;
    cin >> x;
    a[i][0] = floor(x);
    sm += a[i][0];
    a[i][1] = ceil(x);
  }
  long long ans[n], req = 0 - sm;
  for (i = 0; i < n; i++) {
    if (req == 0) {
      ans[i] = a[i][0];
    } else {
      ans[i] = a[i][1];
      if (a[i][1] != a[i][0]) req--;
    }
  }
  for (i = 0; i < n; i++) cout << ans[i] << "\n";
}
int main() {
  42;
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  srand(time(NULL));
  solve();
  return 0;
}
