$\+=$_**($_%3||3)for 1..<>;print