Unfortunately out-of-the box it does not have support for that, however you can use a few lines of C# to do that.
You can follow the tutorial at: http://learn.iis.net/page.aspx/804/developing-a-custom-rewrite-provider-for-url-rewrite-module/
Basically you would include a rule conceptually like this one:
<rule name="Modulus Rewrite">
<match url="(.*)/([\d+])$" />
<action type="rewrite" url="{R:1}{Modulus:{R:2}}" />
</rule>
where you capture the URL, but separately the segment with numbers on it, and pass that to the custom provider
And then your code would look something like the one below and you will use a <condition > to
public class ModulusProvider: IRewriteProvider
{
public void Initialize(IDictionary<string, string> settings, IRewriteContext rewriteContext)
{
}
public string Rewrite(string value)
{
int iVal;
if (int.TryParse(value, out iVal)) {
return (iVal % 1000).ToString(CultureInfo.InvariantCulture);
}
return String.Empty;
}
}