Sum of factorials