#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 4001;
double a[MAX_N];
int low[MAX_N], high[MAX_N];
double sol[2005][2005];
int main() {
  int N;
  double sum_initial = 0;
  scanf("%d\n", &N);
  for (int i = 1; i <= N * 2; ++i) {
    scanf("%lf ", &a[i]);
    low[i] = floor(a[i]);
    high[i] = ceil(a[i]);
    sum_initial += a[i];
  }
  sol[0][0] = sum_initial;
  for (int i = 1; i <= N; ++i) {
    sol[0][i] = sol[0][i - 1] + high[i] - a[i];
    sol[i][0] = sol[i - 1][0] + low[i] - a[i];
  }
  for (int i = 1; i <= N; ++i)
    for (int j = 1; j <= N; ++j) {
      double aux_low = sol[i - 1][j] + low[i + j] - a[i + j];
      double aux_high = sol[i][j - 1] + high[i + j] - a[i + j];
      if (fabs(sum_initial - aux_low) < fabs(sum_initial - aux_high))
        sol[i][j] = aux_low;
      else
        sol[i][j] = aux_high;
    }
  printf("%.3lf", abs(sum_initial - sol[N][N]));
  return 0;
}
