You can stay for a total of 40 days during the validity of the visa. For example, one trip of 40 days, or two trips of 20 days each, or three of 25 days/5 days/10 days.
From How to read the visa sticker
DURATION OF STAY………DAYS indicates the number of days you may stay in the Schengen area. The days should be counted from the date you enter the Schengen area (the entry stamp) to the date you exit the Schengen area (the exit stamp), i.e. both days included.