#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long sum = 0;
int main() {
  scanf("%lld%lld", &n, &m);
  long long max_add = (n - 1) * n / 2;
  long long min_add;
  if (n % 2) min_add = (n / 2 + 1) * (n / 2);
  if (n % 2 == 0) {
    long long a1 = (n / 2 + 1) * (n / 2) / 2;
    long long a2 = (n / 2 - 1) * (n / 2) / 2;
    min_add = a1 + a2;
  }
  for (int i = 1; i <= m; i++) {
    long long x, d;
    scanf("%lld%lld", &x, &d);
    sum += x * n;
    if (d >= 0)
      sum += (long long)d * max_add;
    else
      sum += (long long)d * min_add;
  }
  double ans = sum / 1.0;
  ans = ans / n;
  printf("%.15lf", ans);
  return 0;
}
