import sys input = sys.stdin.readline a=float(input()) a*=1000 a=int(a) ANS=0 x=0 y=0 while True: #print(x,y,ANS) # (x,y)から # (x^1,y+a)へ tox=x^1 toy=y+a if 0<=y<1000 and x==0: if toy%2000==0: k=toy//1000 ANS+=(k-2)*2+2 elif 0