#include <bits/stdc++.h>
using namespace std;
int n, use, bb, cnt;
double now, x;
double a[4010];
int main(void) {
  scanf("%d", &n);
  for (int i = 1; i <= 2 * n; i++) {
    scanf("%lf", &x);
    int y = floor(x);
    if (fabs(x - y) < 1e-12)
      cnt++;
    else
      now -= x - y;
  }
  double ans = 1e18;
  for (int i = max(0, n - cnt); i <= min(n, 2 * n - cnt); i++)
    ans = min(ans, fabs(now + i));
  printf("%.3f\n", ans);
  return 0;
}
