Find self-locating strings in a number Based on this Numberphile video

A self-locating string is a number (or set of numbers) in a decimal expansion which corresponds to its location, from the start of the decimal.

For example, take the number:

.2734126393112


Here, we can identify certain items quickly, e.g:

.27 _3_ _4_ 1263 _9_ 3112


There are a few more complex cases in here though, too. For instance, the numbers 11 and 12 both appear starting in their respective positions:

.2734126393112
 123456789ABCD
           ^
           11

            ^
            12


So the list of self-locating strings in this case would be [3, 4, 9, 11, 12], as even though some of them overlap, they both start in the correct places. If we sum these up, we get 39, or the self-reference index (SRI) of this terminating decimal.

Input

A terminating decimal, either an array of digits (after the point) or a decimal type with 0. at the start/..

Output

The SRI of the input number.

Rules


In the case that there are no self-referential numbers, the SRI is 0. This must be returned/printed, as opposed to exiting or returning undefined.
The decimal expansion can be assumed to terminate, and will be no more than 128 digits in length.
The counting of the indexes should be 1-based, e.g the first decimal is at position 1, etc.
Standard I/O rules + standard loopholes apply.
This is code-golf, so shortest answer in bytes wins


Test cases

0.1207641728 -&gt; 3
.12345678910 -&gt; 55
0.1234567890112 -&gt; 68
.0 -&gt; 0
0.654321 -&gt; 0
.54321 -&gt; 3
APL (Dyalog Extended), 16 bytes



+/⍬∘⍋(⍸⊣⊃¨⍕⍛⍷¨)⊂


Try it online!

Takes a string of digits.

How it works

+/⍬∘⍋(⍸⊣⊃¨⍕⍛⍷¨)⊂  ⍝ Input: character vector of digits
  ⍬∘⍋             ⍝ X←Array of 1-based indices
     (    ⍕⍛ ¨)   ⍝ Stringify each of X
     (      ⍷¨)⊂  ⍝ And for each of above, build a boolean array where
                  ⍝   substring matches are marked as 1
                  ⍝ e.g. '10'⍷'10428104' is [1 0 0 0 0 1 0 0]
       ⊣⊃¨        ⍝ Extract X-th indices from each of above
      ⍸           ⍝ Convert ones to its 1-based locations
+/                ⍝ Sum