I am trying to create a bash script that will provide me with the total number of atoms at the beginning of the file, while also deleting the second count of atoms. However I am unsure how to go about it, since I can't go by column and the line the second value is can vary. Any tips would be much appreciated. An example for this set of molecules would be great too. Thank you in advance.

For example:

```
18
H -1.246549 -3.377143 -1.800000
C -0.707293 -2.432587 -1.800000
C -1.403477 -1.241616 -1.800000
C 0.707293 -2.432587 -1.800000
C -0.716360 0.000000 -1.800000
H -2.492687 -1.240767 -1.800000
C 1.403477 -1.241616 -1.800000
H 1.246549 -3.377143 -1.800000
C 0.716360 0.000000 -1.800000
C -1.403477 1.241616 -1.800000
H 2.492687 -1.240767 -1.800000
C 1.403477 1.241616 -1.800000
H -2.492687 1.240767 -1.800000
C -0.707293 2.432587 -1.800000
C 0.707293 2.432587 -1.800000
H 2.492687 1.240767 -1.800000
H -1.246549 3.377143 -1.800000
H 1.246549 3.377143 -1.800000
17
C -2.432587 0.707293 1.800000
C -1.241616 1.403477 1.800000
C 0.000000 0.716360 1.800000
C 0.000000 -0.716360 1.800000
C -1.241616 -1.403477 1.800000
C -2.432587 -0.707293 1.800000
H 1.240767 2.492687 1.800000
H -3.377143 1.246549 1.800000
H -1.240767 2.492687 1.800000
C 1.241616 1.403477 1.800000
C 1.241616 -1.403477 1.800000
H -1.240767 -2.492687 1.800000
H -3.377143 -1.246549 1.800000
C 2.432587 -0.707293 1.800000
C 2.432587 0.707293 1.800000
H 1.240767 -2.492687 1.800000
H 3.377143 -1.246549 1.800000
```

To turn that previous file into a file like what I have shown below by adding the sum of the atoms together, while also deleting the second number.

```
35
18
H -1.246549 -3.377143 -1.800000
C -0.707293 -2.432587 -1.800000
C -1.403477 -1.241616 -1.800000
C 0.707293 -2.432587 -1.800000
C -0.716360 0.000000 -1.800000
H -2.492687 -1.240767 -1.800000
C 1.403477 -1.241616 -1.800000
H 1.246549 -3.377143 -1.800000
C 0.716360 0.000000 -1.800000
C -1.403477 1.241616 -1.800000
H 2.492687 -1.240767 -1.800000
C 1.403477 1.241616 -1.800000
H -2.492687 1.240767 -1.800000
C -0.707293 2.432587 -1.800000
C 0.707293 2.432587 -1.800000
H 2.492687 1.240767 -1.800000
H -1.246549 3.377143 -1.800000
H 1.246549 3.377143 -1.800000
C -2.432587 0.707293 1.800000
C -1.241616 1.403477 1.800000
C 0.000000 0.716360 1.800000
C 0.000000 -0.716360 1.800000
C -1.241616 -1.403477 1.800000
C -2.432587 -0.707293 1.800000
H 1.240767 2.492687 1.800000
H -3.377143 1.246549 1.800000
H -1.240767 2.492687 1.800000
C 1.241616 1.403477 1.800000
C 1.241616 -1.403477 1.800000
H -1.240767 -2.492687 1.800000
H -3.377143 -1.246549 1.800000
C 2.432587 -0.707293 1.800000
C 2.432587 0.707293 1.800000
H 1.240767 -2.492687 1.800000
H 3.377143 -1.246549 1.800000
```