#include <iostream>

template<const unsigned N>
struct Factorial
{
    enum V
    {
        val = N * Factorial<N-1>::val
    };
};
template<>
struct Factorial<1>
{
    enum V
    {
        val = 1
    };
};

int main()
{
	std::cout << Factorial<5>::val << std::endl;
}