Sum as validation

I have a form that has several questions like number of people (e.g. number of boys 0-17, number of girls 0-17, number of men, number of women, number of men 60+ and number of women 60+) and a question about the total number of participants. I want the form to only accept a value that is equal to the sum of the number questions (as I wrote above). How do I write this formula for validation?

Welcome to the community, @MEAL_r2p! This post discussed previously should help you solve your issue: