#include <bits/stdc++.h>
using namespace std;
int v[1000001];
int main() {
  int n;
  scanf("%d", &n);
  vector<pair<int, int>> v2(n);
  multiset<pair<int, int>> a, b;
  for (int i = 0; i < n; ++i) {
    scanf("%d", v + i);
    if (v[i] >= 0) {
      a.insert({v[i], i});
    } else {
      b.insert({v[i], i});
    }
  }
  while (a.size()) {
    auto lst = *(--a.end());
    b.insert({-lst.first - 1, lst.second});
    a.erase(--a.end());
  }
  auto it = b.begin();
  if (b.size() % 2) {
    while (it != b.end() && (*it).first == -1) it++;
  }
  if (it == b.end())
    for (int i = 0; i < n; ++i) v[i] = 0;
  else {
    if (b.size() % 2) {
      v[it->second] = -it->first - 1;
      b.erase(it);
    }
    for (auto it = b.begin(); it != b.end(); ++it) v[it->second] = it->first;
  }
  for (int i = 0; i < n; ++i) cout << v[i] << " ";
  cout << endl;
}
