Hello
To understand the 18 sts referred to it may help to place markers between each repeat.
Casting on 36 as salmonmac suggests
K13, p5, place marker, (that’s one set of 18)
K13, p5, (that’s the second set of 18)
Or if you want to put the purl border you could cast on an additional 12 making 48 cast on
P6, place marker (border)
K13, p5, place marker (one set of 18)
K13, p5, place marker (second set of 18)
P6 (border)
Although this makes a larger swatch than needed it would give a good idea of how the pattern works and looks. It’s a good place to practise a pattern and also if you keep your swatch you can try out increases, decreases, bind offs etc on it before working them on your project.
Markers are really helpful to keep track of pattern repeats and in particular can help identify how a pattern is continued during shaping for a sweater (armholes, neck and maybe other shaping) because it is easier to see each repeat and any which are no longer full repeats when the stitch count changes.
I hope this helps.