#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long mod = 1e9 + 7;
const int N = 1e5 + 10;
int n, m;
int main() {
  scanf("%d%d", &n, &m);
  long long sum1 = 0, sum2 = 0;
  int t = n - n / 2;
  for (int i = 1; i <= n; i++) {
    sum1 += i - 1;
    sum2 += abs(t - i);
  }
  int x, d;
  long long sum3 = 0;
  long long z1 = 0;
  long long z2 = 0;
  while (m--) {
    scanf("%d%d", &x, &d);
    sum3 += x;
    if (d < 0)
      z1 += d * sum2;
    else
      z2 += d * sum1;
  }
  double ans = sum3;
  ans += 1.0 * (z1 + z2) / n;
  printf("%.12f", ans);
  return 0;
}
