#include <bits/stdc++.h>
using namespace std;
double v[4000];
double pd[4000][2001];
bool used[4000][2001];
int n;
double solve(int curr, int c) {
  if (c > n || curr - c > n) return 1e9;
  if (curr == 2 * n) return 0;
  if (!used[curr][c]) {
    used[curr][c] = 1;
    double ans1 = floor(v[curr]) - v[curr] + solve(curr + 1, c);
    double ans2 = ceil(v[curr]) - v[curr] + solve(curr + 1, c + 1);
    if (fabs(ans1) < fabs(ans2))
      pd[curr][c] = ans1;
    else
      pd[curr][c] = ans2;
  }
  return pd[curr][c];
}
int main(void) {
  int i;
  scanf("%d", &n);
  for (i = 0; i < 2 * n; i++) scanf("%lf", &v[i]);
  printf("%.3lf\n", fabs(solve(0, 0)));
  return 0;
}
