#include <bits/stdc++.h>
using namespace std;
double a[4005], v[4005];
double dp[4005][2004][2];
int n;
void Readinput() {
  scanf("%d", &n);
  for (int i = 1; i <= 2 * n; i++) {
    scanf("%lf", &a[i]);
    v[i] = a[i] - floor(a[i]);
  }
  sort(v + 1, v + 2 * n + 1);
}
void solve() {
  int i, j;
  dp[0][0][0] = 0;
  dp[0][0][1] = 0;
  for (i = 0; i <= 2 * n; i++)
    for (j = i + 1; j <= n; j++) {
      dp[i][j][0] = 1000000007;
      dp[i][j][1] = 1000000007;
    }
  for (i = 1; i <= 2 * n; i++) {
    for (j = 0; j <= min(i, n); j++) {
      if (i == j)
        dp[i][j][0] = 1000000007;
      else
        dp[i][j][0] = (fabs(dp[i - 1][j][0] + v[i] - ceil(v[i])) <
                               fabs(dp[i - 1][j][1] + v[i] - ceil(v[i]))
                           ? (dp[i - 1][j][0] + v[i] - ceil(v[i]))
                           : (dp[i - 1][j][1] + v[i] - ceil(v[i])));
      if (j != 0)
        dp[i][j][1] =
            (fabs(dp[i - 1][j - 1][0] + v[i]) < fabs(dp[i - 1][j - 1][1] + v[i])
                 ? (dp[i - 1][j - 1][0] + v[i])
                 : (dp[i - 1][j - 1][1] + v[i]));
      else
        dp[i][j][1] = 1000000007;
    }
  }
  printf("%.3lf\n", min(fabs(dp[2 * n][n][0]), fabs(dp[2 * n][n][1])));
}
int main() {
  Readinput();
  solve();
  return 0;
}
