#include <bits/stdc++.h>
using namespace std;
struct node {
  double s;
  double g;
};
int main(void) {
  int i, j, k, n;
  scanf("%d", &n);
  double x, y, arr[2 * n][2];
  for (i = 0; i <= 2 * n - 1; i++) {
    scanf("%lf", &arr[i][0]);
    j = arr[i][0];
    arr[i][0] = arr[i][0] - j;
    arr[i][1] = 1 - arr[i][0];
    if (arr[i][1] == 1) arr[i][1] = 0;
  }
  struct node dp[n + 1][n + 1];
  for (i = 0; i <= n; i++) {
    for (j = 0; j <= n; j++) {
      dp[i][j].s = 0;
      dp[i][j].g = 0;
    }
  }
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= i; j++) dp[i][0].g += arr[j - 1][0];
  }
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= i; j++) dp[0][i].s += arr[j - 1][1];
  }
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++) {
      x = dp[i - 1][j].g + arr[i + j - 1][0] - dp[i - 1][j].s;
      if (x < 0) x = -1 * x;
      y = dp[i][j - 1].s + arr[i + j - 1][1] - dp[i][j - 1].g;
      if (y < 0) y = -1 * y;
      if (x <= y) {
        dp[i][j].g = dp[i - 1][j].g + arr[i + j - 1][0];
        dp[i][j].s = dp[i - 1][j].s;
      } else {
        dp[i][j].g = dp[i][j - 1].g;
        dp[i][j].s = dp[i][j - 1].s + arr[i + j - 1][1];
      }
    }
  }
  x = dp[n][n].g - dp[n][n].s;
  if (x < 0) x = -1 * x;
  printf("%0.3lf\n", x);
  return 0;
}
