#include <bits/stdc++.h>
using namespace std;
const int N = 4010;
int n, p[N], q[N];
double d[N];
int main(void) {
  scanf("%d", &n);
  double ans = 0;
  for (int i = 1; i <= n + n; ++i) {
    double x;
    scanf("%lf", &x);
    p[i] = ceil(x);
    q[i] = floor(x);
    ans += 1.00 * p[i] - x;
    d[i] = p[i] - q[i];
  }
  sort(d + 1, d + 1 + 2 * n);
  int l = 1, r = n + n;
  for (int i = 1; i <= n; ++i) {
    if (ans > 0.5)
      ans -= d[r--];
    else
      ans -= d[l++];
  }
  printf("%.3f", abs(ans));
  return 0;
}
