#include <bits/stdc++.h>
using namespace std;
const int N = 4e3 + 1, INF = 1e8;
double val[N], memo[N][N], fl[N], cl[N];
int n, h;
double solve(int i, int u) {
  if (u > h) return INF;
  if (i == n) {
    if (u == h) return 0;
    return INF;
  }
  double &ret = memo[i][u];
  if (ret == ret) return ret;
  ret = solve(i + 1, u + 1) + val[i] - fl[i];
  if (abs(solve(i + 1, u) + val[i] - cl[i]) < abs(ret))
    ret = solve(i + 1, u) + val[i] - cl[i];
  return ret;
}
int main() {
  memset(memo, -1, sizeof memo);
  scanf("%d", &n);
  h = n;
  n += n;
  for (int i = 0; i < n; i++) {
    scanf("%lf", &val[i]);
    fl[i] = floor(val[i]);
    cl[i] = ceil(val[i]);
  }
  printf("%0.3lf\n", abs(solve(0, 0)));
}
