#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 10;
const long long M = 320;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long q, a, b, c, e, d, i, j, k;
  cin >> q;
  long long sum = 0;
  long long mx = 0;
  long long count = 0;
  cout << setprecision(25);
  cin >> a >> a;
  vector<long long> v;
  sum = a;
  mx = a;
  count = 1;
  q--;
  v.push_back(a);
  while (q--) {
    cin >> a;
    if (a == 2) {
      long double ans = mx - (long double)sum / count;
      cout << ans << '\n';
      continue;
    }
    cin >> a;
    v.push_back(a);
    if (count == 1) {
      count++;
      sum += a;
      mx = a;
      continue;
    }
    sum -= mx;
    mx = a;
    sum += mx;
    while (count < v.size()) {
      long double a1, a2;
      a1 = (long double)sum / count;
      a2 = (long double)sum + v[count - 1];
      a2 = (long double)a2 / (count + 1);
      if (a2 < a1) {
        sum += v[count - 1];
        count++;
      } else {
        break;
      }
    }
  }
  return 0;
}
