#include <bits/stdc++.h>
using namespace std;
const double PI = 2.0 * acos(0.0);
const int MOD = 1e9 + 7;
const int oo = MOD;
long long gcd(long long x, long long y) { return !y ? x : gcd(y, x % y); }
const int mx = 4e3 + 5;
int n, c[mx], f[mx];
double in[mx], dp[mx][mx >> 1];
double bt(int i, int cnt) {
  if (i == (n << 1)) return (cnt == n) ? 0 : 1e9;
  if (cnt > n) return 1e9;
  double &ret = dp[i][cnt];
  if (ret != -1) return ret;
  double a, b;
  a = bt(i + 1, cnt + 1) + f[i] - in[i];
  b = bt(i + 1, cnt) + c[i] - in[i];
  if (fabs(a) < fabs(b))
    ret = a;
  else
    ret = b;
  return ret;
}
int main() {
  cin >> n;
  for (int i = 0; i < n << 1; i++) {
    scanf("%lf", &in[i]);
    c[i] = ceil(in[i]);
    f[i] = floor(in[i]);
  }
  for (int i = 0; i < mx; i++) fill(dp[i], dp[i] + mx / 2, -1);
  printf("%.3lf\n", fabs(bt(0, 0)));
  return 0;
}
