#include <bits/stdc++.h>
using namespace std;
const long long N = 2005;
const long double inf = 20000.0;
const long long MOD = 1e9 + 7;
long double a[2 * N], dp[2 * N][N];
long long n, vis[2 * N][N];
long double solve(long long i, long long upLeft) {
  long long downLeft = 2 * n - i - upLeft + 1;
  if (upLeft < 0 || downLeft < 0) return inf;
  if (i > 2 * n) return 0;
  long double &ans = dp[i][upLeft];
  if (vis[i][upLeft]) return ans;
  vis[i][upLeft] = 1;
  ans = inf;
  long double sol1 = (ceil(a[i]) - a[i]) + solve(i + 1, upLeft - 1);
  long double sol2 = (floor(a[i]) - a[i]) + solve(i + 1, upLeft);
  if (abs(sol1) < abs(sol2))
    return ans = sol1;
  else
    return ans = sol2;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (long long i = 1; i <= 2 * n; i++) cin >> a[i];
  memset(dp, -1, sizeof(dp));
  cout << fixed << setprecision(3) << abs(solve(1, n));
  return 0;
}
