Reading just specific pages of multipage tiff, say first and last

Hello there,

I was wondering if there is a way to read just the first and last pages of a multipage tiff without knowing the number of pages in the file? Using tiffcrop one can use the -N flag, as in “-N 1,last” to get just the first and last pages in a file. I tried in gmic but I can’t find what to use for ‘step’ to read only those two pages, as in

gmic foot.tiff,0,-1,<step?>

From the documentation

.tiff files: Only sub-images of multi-pages tiff files can be loaded, using the input expression filename.tif,_first_frame,_last_frame,_step.

Thank you for any suggestion.

For completeness, from tiffcrop documentation:

-N odd|even|#,#-#,#|last
sequences and ranges of images within file to process
The words odd or even may be used to specify all odd or even numbered images.
The word last may be used in place of a number in the sequence to indicate the final image in the file without knowing how many images there are.
Numbers are counted from one even though TIFF IFDs are counted from zero.