#include <bits/stdc++.h>
using namespace std;
long double a, sum, diff, res;
long long n, mini, maxi, fl, cl, cnt;
int main() {
  std::ios::sync_with_stdio(false);
  scanf("%d", &n);
  sum = 0;
  cnt = 0;
  mini = 0;
  maxi = 0;
  for (int i = 1; i <= 2 * n; i++) {
    cin >> a;
    sum += a;
    mini += floorl(a);
    maxi += ceill(a);
    if (a != ((int)a)) cnt++;
  }
  if (cnt > n) {
    maxi -= cnt - n;
    mini += cnt - n;
    cnt = (2 * n) - cnt;
  }
  fl = floorl(sum);
  cl = ceill(sum);
  res = -1;
  if (mini < fl) {
    if (fl - mini < cnt) {
      diff = sum - fl;
      if (diff < 0) diff *= -1;
      if (res == -1 || diff < res) res = diff;
      if (cl - mini <= cnt) {
        diff = cl - sum;
        if (diff < 0) diff *= -1;
        if (res == -1 || diff < res) res = diff;
      }
    } else {
      diff = sum - (mini + cnt);
      if (diff < 0) diff *= -1;
      if (res == -1 || diff < res) res = diff;
    }
  } else {
    diff = mini - sum;
    if (diff < 0) diff *= -1;
    if (res == -1 || diff < res) res = diff;
  }
  if (maxi > cl) {
    if (maxi - cl < cnt) {
      diff = cl - sum;
      if (diff < 0) diff *= -1;
      if (res == -1 || diff < res) res = diff;
      if (maxi - fl <= cnt) {
        diff = sum - fl;
        if (diff < 0) diff *= -1;
        if (res == -1 || diff < res) res = diff;
      }
    } else {
      diff = (maxi - cnt) - sum;
      if (diff < 0) diff *= -1;
      if (res == -1 || diff < res) res = diff;
    }
  } else {
    diff = sum - maxi;
    if (diff < 0) diff *= -1;
    if (res == -1 || diff < res) res = diff;
  }
  cout << fixed << setprecision(3) << res << "\n";
  return 0;
}
