#include <bits/stdc++.h>
#pragma comment(linker, "/STACK: 40000000")
using namespace std;
vector<long long int> graph[100005];
long long int costs[100005];
long long int money[100005];
bool is_vowel(char x) {
  return (x == 'a') || (x == 'i') || (x == 'o') || (x == 'u') || (x == 'e');
}
long long int natural_sum(long long int idx) { return (idx + 1) * idx / 2; }
void solve() {
  ios::sync_with_stdio(false);
  cout << setprecision(10);
  long long int n, m;
  cin >> n >> m;
  long long int sum = 0;
  for (long long int i = 0; i < m; i++) {
    long long int x, d;
    cin >> x >> d;
    sum += x * n;
    if (d >= 0) {
      sum += d * natural_sum(n - 1);
    } else {
      sum += d * natural_sum(n / 2);
      sum += d * natural_sum((n - 1) / 2);
    }
  }
  cout << (long double)sum / n;
}
int main() {
  solve();
  return 0;
}
