#B4288. Count Numbers with Last Digit 3

    ID: 11945 Type: Default 1000ms 256MiB

Count Numbers with Last Digit 3

Count Numbers with Last Digit 3

Given a positive integer \(N\), count how many integers in the range \([3, N]\) have a last digit of 3. Specifically, an integer \(i\) (with \(3 \leq i \leq N\)) is counted if \(i \mod 10 = 3\).

For example, when \(N = 25\), the integers satisfying the condition are 3, 13, and 23, so the answer is 3.

inputFormat

The input consists of a single positive integer \(N\) (with \(N \geq 3\)).

outputFormat

Output a single integer representing the count of numbers between 3 and \(N\) (inclusive) that have 3 as their last digit.

sample

25
3