#include <cstdio>

template <int n> struct T
{
  enum { value = n };
};

template <int n> struct For
{
  enum { value = T<n>::value + For<n - 1>::value  };
};

template <> struct For<0>
{
  enum { value = 0 };
};

int main()
{
  int x = For<10>::value;
  printf("%d\n", x);
  return 0;
}