#include <bits/stdc++.h>
using namespace std;
const long long N = 2e3 + 5;
long long n;
long double cache[N][N], a[2 * N];
long long vis[N][N];
long double dp(long long idx, long long gain, long long loose) {
  if (gain > n || loose > n) return 1e9;
  if (idx == 2 * n + 1) return 0;
  long double &ans = cache[gain][loose];
  if (vis[gain][loose]) return ans;
  long double val1 = 1e9, val2 = 1e9;
  if (gain < n) val1 = ceil(a[idx]) - a[idx] + dp(idx + 1, gain + 1, loose);
  if (loose < n) val2 = floor(a[idx]) - a[idx] + dp(idx + 1, gain, loose + 1);
  if (abs(val1) < abs(val2))
    ans = val1;
  else
    ans = val2;
  vis[gain][loose] = 1;
  return ans;
}
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  memset(vis, 0, sizeof(vis));
  cin >> n;
  for (long long i = 1; i <= 2 * n; i++) cin >> a[i];
  cout << fixed << setprecision(3) << abs(dp(1, 0, 0));
  return 0;
}
