#include <bits/stdc++.h>
const int N = 1000006;
using namespace std;
const long long MOD = 1000000007LL;
template <typename T>
T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
template <typename T>
T power(T x, T y, long long m = MOD) {
  T ans = 1;
  while (y > 0) {
    if (y & 1LL) ans = (ans * x) % m;
    y >>= 1LL;
    x = (x * x) % m;
  }
  return ans % m;
}
int n;
double a[4200];
double dp[4200][4200];
int vis[4200][4200];
double go(int i, int ct) {
  if (ct > n / 2) return 0x3f3f3f3f;
  if (i >= n) {
    if (ct != n / 2) return 0x3f3f3f3f;
    return 0;
  }
  if (vis[i][ct]) return dp[i][ct];
  vis[i][ct] = 1;
  double x = go(i + 1, ct + 1) - a[i];
  double val;
  if (abs(a[i]) < 1e-6)
    val = 0.0;
  else
    val = 1.0 - a[i];
  double y = go(i + 1, ct) + val;
  if (abs(x) < abs(y))
    dp[i][ct] = x;
  else
    dp[i][ct] = y;
  return dp[i][ct];
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  n *= 2;
  for (long long(i) = (0); i < (n); i++) {
    cin >> a[i];
    a[i] -= floor(a[i]);
  }
  for (long long(i) = (0); i < (4200); i++) {
    for (long long(j) = (0); j < (4200); j++) {
      dp[i][j] = -1;
    }
  }
  double val = go(0, 0);
  cout << fixed << setprecision(3) << abs(val) << '\n';
}
