#include <iostream>

class C {
private:
  int n;
public:
  C() {}
  C(const C &ob) { this->n = ob.n; }
  C(const int n) { this->n = n; }
  ~C(){}
  C &operator=(const C &ob) { this->n = ob.n; return *this; }
  friend bool operator==(C const &a,  C const &b) { return (a.n == b.n); }
  friend std::ostream &operator<<(std::ostream &stream, C const &ob) { stream << ob.n; return stream; }
  friend C operator+(C const &a, C const &b) { C c; c.n = a.n + b.n; return c; }

  C operator+=(C const &ob) {*this = *this + ob; return *this; }
};


int main() {
  C s = 0;
  for (int n = 1; n <= 10; n++)
    s += n;
  std::cout << s << std::endl;

  s = 0;
  for (int n = 1; n <= 100; n++)
    s = n + s;
  std::cout << s << std::endl;
  
  std::cout << (2 == s) << std::endl;
  return 0;
}
/* end */
