#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("-Ofast")
#pragma GCC optimize("trapv")
#pragma GCC target( \
    "sse,sse2,sse3,ssse3,sse4,sse4.2,popcnt,abm,mmx,avx2,tune=native")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-funroll-all-loops,-fpeel-loops,-funswitch-loops")
const int MAXN = 1e5 + 40;
const int MAXK = 12;
const long long int INF = 1000000000000000000;
void solve() {
  int n;
  cin >> n;
  long double a[2 * n + 2];
  for (int i = (1); i < (2 * n + 1); i++) {
    cin >> a[i];
  }
  long double dp[2 * n + 3][n + 3];
  for (int i = (0); i < (n + 1); i++) {
    dp[0][i] = 0;
  }
  for (int i = 1; i <= 2 * n; i++) {
    long double diff = (long double)ceil(a[i]) - a[i];
    dp[i][0] = abs(dp[i - 1][0] + (long double)(ceil(a[i]) - a[i]));
    for (int j = (1); j < (min(i, n + 1)); j++) {
      if (abs(dp[i - 1][j] + (ceil(a[i]) - a[i])) <
          abs(dp[i - 1][j - 1] - a[i] + floor(a[i]))) {
        dp[i][j] = dp[i - 1][j] + (ceil(a[i]) - a[i]);
      } else
        dp[i][j] = dp[i - 1][j - 1] - a[i] + floor(a[i]);
    }
    dp[i][i] = dp[i - 1][i - 1] - a[i] + floor(a[i]);
  }
  cout << fixed << setprecision(3) << abs(dp[2 * n][n]) << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int T = 1;
  while (T--) {
    solve();
  }
}
