#include <bits/stdc++.h>
using namespace std;
int read_int() {
  int res;
  scanf("%d", &res);
  return res;
}
long long read_l() {
  long long res;
  scanf("%I64d\n", &res);
  return res;
}
double read_double() {
  double res;
  scanf("%lf", &res);
  return res;
}
int read_int_from(const char* from) {
  int res;
  FILE* f = fopen(from, "r");
  fscanf(f, "%d", &res);
  fclose(f);
  return res;
}
void read_ints(int* a, int n) {
  for (int i = 0; i < n; ++i) {
    scanf("%d", a + i);
  }
}
void read_doubles(double* a, int n) {
  for (int i = 0; i < n; ++i) {
    scanf("%lf", a + i);
  }
}
void read_all_ints(int* a, int& n) {
  n = 0;
  while (scanf("%d", a + n) > 0) ++n;
}
void for_each(int* begin, int* end, void (*fun)(int)) {
  for (; begin != end; ++begin) fun(*begin);
}
void print(int x) { printf("%d\n", x); }
void print_d(double x) { printf("%lf\n", x); }
void print_l(long long x) { printf("%I64d\n", x); }
void print_s(char* s) { printf("%s\n", s); }
void print_to(const char* fname, int x) {
  FILE* f = fopen(fname, "w");
  fprintf(f, "%d\n", x);
  fflush(f);
  fclose(f);
}
void print_ints(int* a, int n) {
  for (int i = 0; i < n; ++i) {
    if (i) {
      printf(" ");
    }
    printf("%d", a[i]);
  }
  print_s("");
}
void print_doubles(double* a, int n) {
  for (int i = 0; i < n; ++i) {
    if (i) {
      printf(" ");
    }
    printf("%lf", a[i]);
  }
  print_s("");
}
template <typename T>
void print_pairs(T* a, int n) {
  for (int i = 0; i < n; ++i) {
    cout << a[i].first << " " << a[i].second << endl;
  }
}
bool in_range(int value, int a, int b) { return value >= a && value < b; }
int pwr_by_mod(int n, int a, int mod) {
  if (a == 0) {
    return 1;
  }
  int r = 1;
  if (a % 2) r = n % mod;
  r = r * pwr_by_mod(n * n % mod, a / 2, mod) % mod;
  return r;
}
int gcd(int a, int b) {
  while (a) {
    a ^= b ^= a ^= b %= a;
  }
  return b;
}
int lcm(int a, int b) { return a / gcd(a, b) * b; }
pair<int, int> get_gcd_vector(int a, int b) {
  int g = gcd(abs(a), abs(b));
  return make_pair(a / g, b / g);
}
pair<int, int> negate_vector(pair<int, int> v) {
  return make_pair(-v.first, -v.second);
}
long long labs(long long x) {
  if (x < 0) return -x;
  return x;
}
int fenwick_get(int* B, int x) {
  int res = 0;
  for (int i = x; i > 0; i -= i & -i) {
    res += B[i];
  }
  return res;
}
int fenwick_add(int* B, int N, int x, int v) {
  for (int i = x; i < N; i += i & -i) {
    B[i] += v;
  }
}
int n;
double a[10010];
double a0[10010];
double a1[10010];
pair<double, int> d0[10010], d1[10010];
int main() {
  read_doubles(a, n = read_int() * 2);
  double initial = 0.0, res = 0.0;
  int ones = 0, zeros = n;
  for (int i = 0; i < n; ++i) {
    if (int(a[i] - 1e-9) != int(a[i] + 1e-9) ||
        (a[i] - 1e-9 < 0 && a[i] + 1e-9 > 0)) {
    } else {
      initial += a[i] - floor(a[i]);
      ones += 1;
      zeros -= 1;
    }
  }
  int used = 0;
  for (int i = 0; i < n / 2; ++i) {
    if (initial > 0.5 && ones > 0) {
      initial -= 1.0;
      ones -= 1;
    } else if (zeros == 0) {
      initial -= 1.0;
      ones -= 1;
    } else {
      zeros -= 1;
    }
  }
  printf("%.3lf\n", fabs(initial));
  return 0;
}
