#include <bits/stdc++.h>
using namespace std;
double a[4010];
long long dp[4010][4010], b[4010][2];
int n;
long long dfs(int i, int r1, int r2, long long ss) {
  if (i > 2 * n) return dp[r1][r2] = 0;
  if (r1 <= 0 && r2 <= 0) return 0;
  if (dp[r1][r2] != 0xfffffff) return dp[r1][r2];
  long long bs = ss, as = ss, s1, s2;
  if (r1) {
    s1 = (b[i][1] + dfs(i + 1, r1 - 1, r2, ss + b[i][1]));
    as += (b[i][1] + dfs(i + 1, r1 - 1, r2, ss + b[i][1]));
  }
  if (r2) {
    s2 = b[i][0] + dfs(i + 1, r1, r2 - 1, ss + b[i][0]);
    bs += b[i][0] + dfs(i + 1, r1, r2 - 1, ss + b[i][0]);
  }
  if (r1 && r2) {
    if (abs(bs) < abs(as))
      return dp[r1][r2] = s2;
    else
      return dp[r1][r2] = s1;
  } else if (r1)
    return dp[r1][r2] = s1;
  else
    return dp[r1][r2] = s2;
}
int main() {
  int i, j;
  scanf("%d", &n);
  for (i = 0; i <= 2 * n; i++)
    for (j = 0; j <= 2 * n; j++) dp[i][j] = 0xfffffff;
  for (i = 1; i <= 2 * n; i++) {
    scanf("%lf", &a[i]);
    b[i][1] = (floor(a[i]) - a[i]) * 10000000;
    b[i][0] = (ceil(a[i]) - a[i]) * 10000000;
  }
  long long s = dfs(1, n, n, 0);
  printf("%.3lf\n", (double)fabs(s) / 10000000.0);
  return 0;
}
