#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ii = pair<int, int>;
const int N = 250005;
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  ll ans = 0;
  ll ini = 0;
  ll meio = 0;
  while (m--) {
    int x, d;
    scanf("%d %d", &x, &d);
    ans += x * n;
    if (d < 0)
      meio += d;
    else
      ini += d;
  }
  for (int i = 1; i <= n; i++) {
    ans += ini * abs(i - 1);
    ans += meio * abs(i - (n + 1) / 2);
  }
  printf("%.15lf\n", ans / (double)n);
  return 0;
}
