Triangle sum