
"""simple docstring"""

import requests

try:
   from django.contrib.auth import authenticate, login
   from django.shortcuts import redirect, render
except ImportError:
   SCREAMING_SNAKE_CASE_			    =  SCREAMING_SNAKE_CASE_			    =  SCREAMING_SNAKE_CASE_			    =  SCREAMING_SNAKE_CASE_			    =  print




def 			lowercase__  (    lowerCAmelCase :    Dict       )       ->					Any:






    """simple docstring"""




    UpperCAmelCase  	=    'secretKey'
    UpperCAmelCase  	=    'https://www.google.com/recaptcha/api/siteverify'

    # when method is not POST, direct user to login page
    if request.method != "POST":
        return render(lowerCAmelCase       , 'login.html'       )

    # from the frontend, get username, password, and client_key
    UpperCAmelCase  	=    request.POST.get('username'       )
    UpperCAmelCase  	=    request.POST.get('password'       )
    UpperCAmelCase  	=    request.POST.get('g-recaptcha-response'       )

    # post recaptcha response to Google's recaptcha api
    UpperCAmelCase  	=    requests.post(lowerCAmelCase       , data={'secret': secret_key, 'response': client_key}       )
    # if the recaptcha api verified our keys
    if response.json().get('success'       , lowerCAmelCase       ):
        # authenticate the user
        UpperCAmelCase  	=    authenticate(lowerCAmelCase       , username=lowerCAmelCase       , password=lowerCAmelCase       )
        if user_in_database:
            login(lowerCAmelCase       , lowerCAmelCase       )
            return redirect('/your-webpage'       )
    return render(lowerCAmelCase       , 'login.html'       )





"""simple docstring"""

from math import floor, sqrt




def 			lowercase__  (    lowerCAmelCase :    int       )       ->					int:






    """simple docstring"""




    UpperCAmelCase  	=    0.0
    UpperCAmelCase  	=    1.0
    UpperCAmelCase  	=    int(sqrt(lowerCAmelCase       )       )
    UpperCAmelCase  	=    root
    UpperCAmelCase  	=    0
    while integer_part != 2 * root:
        UpperCAmelCase  	=    denominator * integer_part - numerator
        UpperCAmelCase  	=    (n - numerator**2) / denominator
        UpperCAmelCase  	=    int((root + numerator) / denominator       )
        period += 1
    return period




def 			lowercase__  (    lowerCAmelCase :    int = 10_000       )       ->					int:






    """simple docstring"""




    UpperCAmelCase  	=    0
    for i in range(2       , n + 1       ):
        UpperCAmelCase  	=    sqrt(lowerCAmelCase       )
        if sr - floor(lowerCAmelCase       ) != 0 and continuous_fraction_period(lowerCAmelCase       ) % 2 == 1:
            count_odd_periods += 1
    return count_odd_periods


if __name__ == "__main__":
   print(F'{solution(int(input().strip()))}')



