#include <iostream>

using namespace std;

class Modulo {
public:
    Modulo(int n = 0);

    Modulo operator+(Modulo &rhs); // rhs = right hand side

    static const int modulus;
    int number;
};

const int Modulo::modulus = 7;

Modulo::Modulo(int n) {
    this->number = n % this->modulus;
}

Modulo Modulo::operator+(Modulo &rhs) {
    return Modulo(this->number + rhs.number);
}

int main() {
    Modulo m(5), n(6), k;

    k = m + n;
    cout << m.number << " + " << n.number
         << " (mod " << Modulo::modulus << ") = " << k.number << endl;
    
    k = m.operator+(n);
    cout << m.number << " + " << n.number
         << " (mod " << Modulo::modulus << ") = " << k.number << endl;

//    cout << m << endl;  // to do
            
    return 0;
}
