Module: Nested Loops


Problem

2 /8


Palindrome

Problem

A palindrome is a number that is equally readable in both directions (does not change when rearranging its numbers in the reverse order).
Given a natural number K. Display the number of natural palindromes not exceeding the number K

Input: Given a single number K  (\(1<=K<=100000\)).
Output: It is necessary to deduce the number of natural palindromes not exceeding K.

Example
Input Output
1 1 1
2 100 18