A flat roof is generally allowed to be 2 layers unless you’re using torch-on roofing, which can be 3 layers.