#include <bits/stdc++.h>
using namespace std;
ifstream fin("B.in");
double d[200001], maxv = 1 << 30, s;
struct stra {
  int x, from;
} v[200001];
int s1[200001], s2[200001], a, b, x, y, n, m, five, zero, rest, l, u;
bool cmp(const stra &a, const stra &b) { return (a.x < b.x); }
int main() {
  cin >> n;
  n *= 2;
  for (int i = 1; i <= n; ++i) {
    cin >> d[i];
    v[i].x = (int(d[i] * 10000) % 10000);
    if (v[i].x % 10 == 9)
      v[i].x = v[i].x / 10 + 1;
    else
      v[i].x /= 10;
    v[i].from = i;
  }
  sort(v + 1, v + n + 1, cmp);
  int i;
  for (i = 1; i <= n; ++i) {
    if (v[i].x != 0) break;
  }
  zero = i - 1;
  rest = (n / 2 - zero);
  if (rest < 0) rest = 0;
  for (int k = 0; k <= zero; ++k) {
    s = 0;
    if (k + n - zero < n / 2 || n - k < n / 2) continue;
    for (i = zero + 1; i <= zero + n / 2 - k && i <= n; ++i) {
      s += (d[v[i].from] - int(d[v[i].from]));
    }
    for (; i <= n; ++i) {
      s -= (int(d[v[i].from] + 1) - d[v[i].from]);
    }
    s = fabs(s);
    if (s < maxv) maxv = s;
  }
  cout << fixed << setprecision(3) << maxv;
}
