#include <bits/stdc++.h>
using namespace std;
double a[40000];
int main(int argc, char *argv[]) {
  int n;
  while (scanf("%d", &n) != EOF) {
    for (int i = 0; i < (int)(2 * n); i++) scanf("%lf", a + i);
    int num = 0;
    double acc = 0.0;
    for (int i = 0; i < (int)(2 * n); i++) {
      double f = floor(a[i]), d = a[i] - f;
      if (d == 0.0)
        num++;
      else
        acc += d;
    }
    int u = min(2 * n - num, n), l = max(0, n - num);
    double ans = 10000000.0;
    for (int i = l; i <= u; i++) ans = min(ans, fabs(acc - i));
    printf("%.3f\n", ans);
  }
  return 0;
}
