#include <iostream>

using namespace std;

class Vektor {
  private:
    double* ap;
    int    len;

  public:
    Vektor(int n, double x = 0): len(n) {
      ap = new double[n];
      for (int i = 0; i < n; i++) ap[i] = x;
    }

    ~Vektor() {
      delete[] ap;
    }

    double sum() {
      double s = 0;
      for (int i = 0; i < len; i++) s += ap[i];
      return s;
    }
};

int main() {
  Vektor a(1);
  cout << a.sum() << endl;
}
