You are to write a program which outputs a single positive integer \$n\$. The integer may have leading zeros and whitespace, and/or trailing whitespace.
Then, choose a positive integer \$m > 1\$. When the program is repeated exactly \$m\$ times, it should output \$m \times n\$ (and only \$m\times n\$). When repeated any number of times other than \$m\$, it should output \$n\$ (and only \$n\$).
You may choose the value of \$m\$, so long as it is a positive integer greater than 1.
In this context, "repeated \$m\$ times" means that the whole program is repeated \$m\$ times, rather than each character. For example, repeating
abcde \$4\$ times yields
This is code-golf so the shortest code (not repeated \$m\$ times) in bytes wins.
For example, if your program is
print 5 which outputs 5, and you choose \$m = 3\$, then:
print 5should output 5
print 5print 5should output 5
print 5print 5print 5should output 15
print 5print 5print 5print 5should output 5
print 5print 5print 5print 5print 5should output 5