InDesign auto-numbering paragraph styles

OK. I have a document with three Paragraph styles for headings: Heading 1, 2 and 3. I want every Heading 1 to be preceeded by a new number, while I want every Heading 2 to be preceeded by the number of the preceeding Heading 1 plus a unique, incremental number separated by a “.”. Every Heading 3 should be preceeded by the by the number of the preceeding Heading 2 plus a unique, incremental number separated by a “.”.

Basically, I mean auto-numbering in InDesign:
1
1.1
1.1.1 …

Can anyone think of a simple way of doing this?

Thanks,

P.