class MyInt extends int {
    MyInt(int value) {
        self.setValue(value);
    }

    virtual MyInt clone() {
        MyInt new_int = new MyInt();
        new_int.setValue(self);
        return new_int;
    }
}
