1. You are given a number N. 2. You have to find the minimum number of squares that sum to N. 3. You can always represent a number as a sum of squares of other numbers. For eg -> In worst case N can be represented as (1*1) + (1*1) + (1*1)..... N times.
Input Format
An integer N
Output Format
Check the sample output and question video.
Constraints
1 <= N <= 10^5
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
35
Output
3