Jay invited 22 guests and Gloria invited 36 so they invited 22+36 = <<22+36=58>>58 guests
They also each wanted a flag so in total they would need 1+1+58 = <<1+1+58=60>>60 flags
The craft store has them on sale at 5 for $1.00 and they need 60 flags so the flags will cost them 60/5 = $12.00
#### 12