#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  int m;
  int mid;
  long double sum = 0;
  cin >> n >> m;
  mid = n / 2;
  while (m--) {
    cin >> a >> b;
    sum += n * a;
    if (b > 0) {
      int first = b;
      int last = b * (n - 1);
      long double temp = (double)(first + last);
      temp *= (n - 1);
      temp /= 2;
      sum += temp;
    } else if (b < 0) {
      int first = b;
      int last = b * (mid);
      long double temp = (double)(first + last);
      temp *= (mid);
      temp /= 2;
      sum += temp;
      int rem = n - mid - 1;
      first = b;
      last = b * (rem);
      temp = (double)(first + last);
      temp *= (rem);
      temp /= 2;
      sum += temp;
    }
  }
  cout << fixed << (sum / n);
  return 0;
}
