#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000 + 20;
int n;
double k[maxn * 2], dp[maxn * 2][maxn], sum[maxn * 2], f[maxn * 2], c[maxn * 2];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= 2 * n; i++) {
    cin >> k[i];
    f[i] = floor(k[i]);
    c[i] = ceil(k[i]);
    sum[i] += sum[i - 1];
    sum[i] += k[i];
  }
  for (int i = 1; i <= 2 * n; i++) {
    for (int j = 0; j <= n; j++) {
      double dif = 100000;
      if (j) {
        double x = dp[i - 1][j - 1] + f[i];
        dif = abs(sum[i] - x);
        dp[i][j] = x;
      }
      if (i != j) {
        double y = dp[i - 1][j] + c[i];
        if (abs(sum[i] - y) < dif) dp[i][j] = y;
      }
    }
  }
  cout << setprecision(3) << fixed << abs(sum[2 * n] - dp[2 * n][n]) << endl;
  return 0;
}
