#include <bits/stdc++.h>
using namespace std;
template <class T>
void checkmax(T &t, T x) {
  if (x > t) t = x;
}
template <class T>
void checkmin(T &t, T x) {
  if (x < t) t = x;
}
template <class T>
void _checkmax(T &t, T x) {
  if (t == -1 || x > t) t = x;
}
template <class T>
void _checkmin(T &t, T x) {
  if (t == -1 || x < t) t = x;
}
int main() {
  int n, num, flag;
  double dou, sum, sub;
  while (cin >> n) {
    sum = num = flag = 0;
    for (int i = 0; i < (2 * n); ++i) {
      scanf("%lf", &dou);
      sub = ceil(dou) - dou;
      sum += sub;
      if (sub < 10e-4 && sub > -10e-4) num++;
    }
    sum -= n - num;
    if (num == 0)
      printf("%.3lf\n", fabs(sum));
    else {
      for (int i = 0; i < (num); ++i) {
        if (fabs(sum) > fabs(sum - 1))
          sum = sum - 1;
        else {
          printf("%.3lf\n", fabs(sum));
          flag = 1;
          break;
        }
      }
      if (!flag) printf("%.3lf\n", fabs(sum));
    }
  }
  return 0;
}
