#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  int b1(0), b2(-1);
  long long int sum = 0;
  for (int i = 0; i < n; i++) {
    int c1, c2;
    cin >> c1;
    if (c1 == 1) {
      cin >> c2;
      a[++b2] = c2;
    } else {
      while ((double(sum + a[b2])) / (b1 + 1) > double(a[b1])) {
        sum += a[b1++];
      }
      printf("%.8lf\n", double(a[b2]) - (double(sum + a[b2])) / (b1 + 1));
    }
  }
  return 0;
}
