#include <bits/stdc++.h>
using namespace std;
const int maxN = 1e5 + 5;
int N;
pair<long long, long long> a[maxN];
inline long long Gcd(long long x, long long y) { return y ? Gcd(y, x % y) : x; }
void init() {
  cin >> N;
  for (int i = (1), _end = (N); i <= _end; ++i)
    cin >> a[i].first >> a[i].second;
  reverse(a + 1, a + 1 + N);
}
double pro[maxN];
double pw2[maxN];
inline double Cross(pair<long long, long long> A,
                    pair<long long, long long> B) {
  return A.first * B.second - A.second * B.first;
}
int GetBnd(pair<long long, long long> A, pair<long long, long long> B) {
  return Gcd(abs(A.first - B.first), abs(A.second - B.second)) + 1;
}
void solve() {
  double ans = 0;
  int len = min(65, N - 1);
  pw2[0] = 1;
  for (int i = (1), _end = (100); i <= _end; ++i) pw2[i] = pw2[i - 1] * 2;
  if (N >= 50) {
    for (int i = (1), _end = (len); i <= _end; ++i) {
      pro[i] = 1. / pw2[i + 1];
    }
  } else {
    for (int i = (1), _end = (len); i <= _end; ++i) {
      pro[i] =
          (pw2[N - i - 1] - 1) / (pw2[N] - 1 - N - (double)N * (N - 1) / 2);
    }
  }
  double Area = .0, BndCnt = .0;
  for (int i = (1), _end = (N); i <= _end; ++i) {
    if (i >= 3)
      Area += (double)-Cross(
          make_pair(a[((i - 1 - 1 + N) % N + 1)].first - a[1].first,
                    a[((i - 1 - 1 + N) % N + 1)].second - a[1].second),
          make_pair(a[i].first - a[1].first, a[i].second - a[1].second));
    BndCnt += (double)GetBnd(a[i], a[((i + 1 - 1 + N) % N + 1)]);
  }
  ans = (Area - BndCnt + N) / 2 + 1;
  for (int i = (1), _end = (N); i <= _end; ++i) {
    long long bndcnt = 0, area = 0;
    for (int j = (1), _end = (65); j <= _end; ++j) {
      area += Cross(
          make_pair(a[((i + j - 1 + N) % N + 1)].first - a[i].first,
                    a[((i + j - 1 + N) % N + 1)].second - a[i].second),
          make_pair(a[((i + j - 1 - 1 + N) % N + 1)].first - a[i].first,
                    a[((i + j - 1 - 1 + N) % N + 1)].second - a[i].second));
      bndcnt += GetBnd(a[((i + j - 1 - 1 + N) % N + 1)],
                       a[((i + j - 1 + N) % N + 1)]);
      if (((i + j - 1 + N) % N + 1) == ((i - 1 - 1 + N) % N + 1)) break;
      if (j != 1) {
        long long tmp = GetBnd(a[i], a[((i + j - 1 + N) % N + 1)]);
        long long lover = bndcnt + tmp - j - 1;
        ans -= (tmp - 2 + (area - lover) / 2 + 1) * pro[j];
      }
    }
  }
  printf("%.20f\n", ans);
}
int main() {
  ios::sync_with_stdio(false);
  init();
  solve();
  return 0;
}
