{{subst:subst}}#ifexpr:{{{2}}}>{{subst:#ifeq:+|-|{{{1}}}|1}}|{{subst:#ifeq:+|-|{{{1}}} {{subst:#expr:7*{{{1}}}}}}}
{{subst:subst}}for2|{{subst:#ifeq:+|-|{{subst:#expr:{{{1}}}+1}}|1}}|{{{2}}}}}|{{{1}}} {{subst:#expr:7*{{{1}}}}}}}

Substituting this template produces one or more new substitution template calls, allowing recursive change of a page, see Help:Recursive conversion of wikitext.