How to combine two middle-grey images and keep the same value? (i have answered myself, problem solved)

If two middle-grey (0.5 value) images are used and combined in Overlay mode the image will get darker. How can i keep the same value and add the details of both textures?

Here is the ambiant occlusion map with a middle-grey:



And here i add another texture in overlay with a middle-grey this can be a bent map for the lighting or a curvature map, as you can see the image becomes darker and it becomes very dark if i increase the factor:
To combine two textures with a middle-grey and keep the same value connect your previous image to an overlay node and the new in the second slot.

Because Blender uses sRGB and not a Linear color management you need to correct the gamma by connecting it to a gamma node in the image slot and for the second slot connect a math Divide node with 1 on top et 2.2.