#include <iostream>
using namespace std;

enum Z2 { Plus, Minus };

template<class T>
T identity_element() { return T(1); }

template<>
Z2 identity_element<Z2>() { return Plus; }

Z2 operator*(Z2 a, Z2 b)
{
	// writeme
}

ostream& operator<<(ostream& os, Z2 a)
{
	// writeme
}

template<class T>
T operator*(T a, Z2 b)
{
	// writeme
}

template<class T>
T operator*(Z2 b, T a)
{
	// writeme
}

template<class T>
T mypow(T a, unsigned int n)
{
	// writeme
}

int main()
{
	// some testing - add your own!
	cout << Plus*Minus << endl;
	cout << Plus*1*Minus << endl;
	cout << (1.+3.)*mypow(Minus,4) << endl;
}
