#include <iostream>
#include <new>
#include <cstddef>

using namespace std;

int main() {
  size_t n;
  cout << "n: "; cin >> n;

  double* a;
  try {
    a = new double[n];

    a[0] = 3.14;
    cout << a[0] << endl;
  } catch (const bad_alloc& e) {
    cerr << "Zu wenig Speicherplatz fuer a vorhanden: "
         << e.what() << endl;
    return 1;
  }

  return 0;
}
