#include <bits/stdc++.h>
using namespace std;
long long Set(long long N, long long pos) { return N = N | (1LL << pos); }
long long reset(long long N, long long pos) { return N = N & ~(1LL << pos); }
bool check(long long N, long long pos) { return (bool)(N & (1LL << pos)); }
long long dx[] = {1, 0, -1, 0};
long long dy[] = {0, 1, 0, -1};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  vector<long double> v;
  long long sum = 0;
  while (n--) {
    long double a;
    cin >> a;
    sum += (long long)a;
    v.push_back(a);
  }
  for (long long i = 0; i < v.size(); i++) {
    if (sum > 0) {
      if ((long long)v[i] != v[i] and v[i] < 0.0) {
        long long x = v[i];
        x -= 1;
        sum -= 1;
        cout << x << '\n';
      } else
        cout << (long long)v[i] << '\n';
    } else if (sum < 0) {
      if ((long long)v[i] != v[i] and v[i] > 0.0) {
        sum += 1;
        long long x = v[i];
        x += 1;
        cout << x << '\n';
      } else
        cout << (long long)v[i] << '\n';
    } else
      cout << (long long)v[i] << '\n';
  }
}
