Pick the last element of a list

Hi everybody,

I have created a grid and now I want to build walls on the surrounding lines. I only Need the first and the last item of the list. 

I know that I can achieve this by using an Expression. I simply dont know what I have to type in. Of Course I could just say: LinesGridX[2] and then it would get me this particular item. The Problem is, that i always have to rewrite the Code, when I Change the number of Grid Lines.

Here is an Image of my model so far:

Thank you for your help Slight smile

Heiko