From what I understand, you need to subtract 1 from the face value of the digit that occurs at the end of a fraction.
To do this, first, you'll have to find the position of the decimal in the fraction, then subtract 1/10^positionOfDecimal from the number.
Example code.
Dim result As Interger
Dim indexOfDecimalPoint As Integer = orig.text.IndexOf(".")
Dim numberOfDecimals As Integer = orig.text.Substring(indexOfDecimalPoint + 1).Length
result = Val(orig.text) - 1/(10^numberOfDecimals)
The above code should do what you're trying.