#include <bits/stdc++.h>
using namespace std;
vector<pair<bool, pair<int, int> > > v;
int str2int(string s) {
  stringstream z(s);
  int u;
  z >> u;
  return u;
}
int main() {
  int n;
  cin >> n;
  int sum = 0;
  int u = 0;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    int pos = s.find(".");
    int num = str2int(s.substr(0, pos));
    if (s.substr(pos + 1) == "00000") {
      v.push_back({false, {num, i}});
    } else {
      if (s[0] == '-') {
        --num;
      }
      u++;
      v.push_back({true, {num, i}});
    }
    sum += num;
  }
  for (auto &p : v) {
    if (p.first) {
      if (sum) {
        ++sum;
        ++p.second.first;
      }
      cout << p.second.first << endl;
    } else {
      cout << p.second.first << endl;
    }
  }
  return 0;
}
