#include <bits/stdc++.h>
const double EPS = 1e-24;
const long long int MOD = 1000000007ll;
const double PI = 3.14159265359;
int INF = 2147483645;
template <class T>
T Max2(T a, T b) {
  return a < b ? b : a;
}
template <class T>
T Min2(T a, T b) {
  return a < b ? a : b;
}
template <class T>
T Max3(T a, T b, T c) {
  return Max2(Max2(a, b), c);
}
template <class T>
T Min3(T a, T b, T c) {
  return Min2(Min2(a, b), c);
}
template <class T>
T Max4(T a, T b, T c, T d) {
  return Max2(Max2(a, b), Max2(c, d));
}
template <class T>
T Min4(T a, T b, T c, T d) {
  return Min2(Min2(a, b), Max2(c, d));
}
template <class T>
void Swap(T& a, T& b) {
  T temp;
  temp = a;
  a = b;
  b = temp;
}
using namespace std;
int N;
int z = 0;
double re = 0.0;
double sum = 0.0;
int main() {
  std::ios::sync_with_stdio(false);
  cin >> N;
  for (int i = 1; i <= 2 * N; i++) {
    double d;
    cin >> d;
    int f = d;
    d -= f;
    if (d - re < EPS) z++;
    sum += d;
  }
  int nz = 2 * N - z;
  int s = sum;
  int done = 0;
  for (int i = 1;; i++) {
    if (nz == 0 || done == N) break;
    if (fabs(sum - 1) < fabs(sum)) {
      nz--;
      done++;
      sum -= 1;
    } else
      break;
  }
  if (done != N) {
    while (z) {
      done++;
      z--;
      if (done == N) break;
    }
    if (z == 0) sum -= N - done;
  }
  cout << fixed << setprecision(3) << fabs(sum);
  return 0;
}
