#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-7;
class Google {
 public:
  double run(const double a[], const int n) {
    int num = 0;
    double sum = 0.0;
    for (int i = 0; i < 2 * n; i++) {
      if (a[i] - floor(a[i]) < EPS) num++;
      sum -= a[i] - floor(a[i]);
    }
    double ans = 1e10;
    int start = max(n - num, 0);
    int end = min(2 * n - num, n);
    for (int i = start; i <= end; i++) {
      ans = min(ans, fabs(sum + i));
    }
    return ans;
  }
};
static const int N = 2006;
double a[2 * N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < 2 * n; i++) scanf("%lf", &a[i]);
  Google g;
  double ans = g.run(a, n);
  printf("%.3f\n", ans);
  return 0;
}
