Rule: calculate length