#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k = 0;
  double sum = 0.000;
  cin >> n;
  for (int i = 1; i <= 2 * n; i++) {
    double d;
    cin >> d;
    d = d - (int)d;
    sum += d;
    if (d != (int)d) {
      k++;
    }
  }
  double m = 0, ans;
  while (true) {
    if (k - m <= n) {
      break;
    }
    m++;
  }
  if (sum <= m) {
    ans = m - sum;
    goto here;
  }
  if (sum >= k - m) {
    ans = sum - (k - m);
    goto here;
  }
  if (sum - (int)sum <= 0.5) {
    ans = sum - (int)sum;
  } else {
    ans = ((int)sum + 1) - sum;
  }
here:
  printf("%.3f", ans);
}
