Find the number of integers in the range from 1 to N that ends with 2 Task

As input you have:


a positive integer N


And you should output:


The number of integers in \$[1,N]\$ (an inclusive range) which end with the digit \$2\$ in base ten.


Test cases

1 -&gt; 0
2 -&gt; 1
5 -&gt; 1
10 -&gt; 1
12 -&gt; 2
20 -&gt; 2
30 -&gt; 3
54 -&gt; 6
97 -&gt; 10
100 -&gt; 10


Rules

It is a code-golf so the lowest score in bytes wins!
Python 2, 17 bytes



lambda n:(n+8)/10


Try it online! Uses Python 2's integer division. In Python 3 would be a byte longer with lambda n:(n+8)//10.