Addition of masked inputs