#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18 + 1;
const int N = 1000002;
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
long long power(long long A, long long B, long long mod = 1000000007) {
  long long r = 1;
  while (B > 0) {
    if (B & 1LL) r = (r * A) % mod;
    A = (A * A) % mod;
    B >>= 1;
  }
  return r;
}
struct set_comp {
  bool operator()(const int& lhs, const int& rhs) { return lhs < rhs; }
};
double a[4002];
int main() {
  int n, i, c = 0, k;
  double sumd = 0;
  cin >> n;
  for (i = 1; i <= 2 * n; i++) {
    cin >> a[i];
    if (a[i] == (int)(a[i]))
      c++;
    else
      sumd = sumd + ceil(a[i]) - a[i];
  }
  double mv = 1000000007;
  for (k = max(0, c - n); k <= min(n, c); k++) {
    int n1 = n - k;
    double diff = abs(sumd - n1);
    if (diff < mv) mv = diff;
  }
  printf("%0.3f\n", mv);
  return 0;
}
