peterverebics/CodeNet_Python_118 huggingface dataset:
S = input()

ls =[0 for i in range(2019)]
ls[0] += 1
p_amari = 0
kake = 1
len_s = len(S)
for i in range(len_s) :
	p_amari = ( int(S[len_s-1-i]) * kake + p_amari ) % 2019
	ls[p_amari] += 1
	kake *= 10
ret = 0
for i in range(2019) :
	n = ls[i]
	if n == 0 :
		continue
	ret += n * (n -1 ) / 2
print(ret)
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    S = input()
    ans = 0
    for i in range(2019, 200000, 2019):
        ind = -1
        stri = str(i)
        while True:
            ind = S.find(stri, ind + 1)
            if ind >= 0:
                ans += 1
            else:
                break
    print(ans)

if __name__ == '__main__':
    main()
s = input()
len_s = len(s)

ans = 0
i = 0

while i < len_s-3:
    for y in range(i+3, len_s+1):
        if int(s[i:y+1]) % 2019 == 0:
            ans += 1
            i = y
            break
        if y+1 == len_s:
            i += 1
print(ans)
S = input()

ans = 0
left = 0
while left < len(S):
    right = left + 1
    while right <= len(S) and int(S[left:right]) % 2019 != 0:
        right += 1
    if int(S[left:right]) % 2019 == 0:
        ans += 1
        left = right - 1
    else:
        left += 1

print(ans)
S = list(input())
n = len(S)

if n <= 3:
    print(0)
    exit()

ans = 0
r, l = 3, 0
number = S[0]+S[1]+S[2]

while r < n:
    if int(number + S[r]) % 2019 == 0:
        number += S[r]
        r += 1
        ans += 1
    elif r == l+3:
        number += S[r]
        r += 1
    else:
        number = number[1:]
        l += 1

print(ans)
from collections import Counter
S = str(input())
N = len(S)

#smod = [int(S[i:])%2019 for i in range(N)]
smod = [0]
temp = 0
for i in range(N):
    temp = temp + int(S[(N-1)-i])*pow(10,i)
    print(temp)
    smod.append(temp%2019)


cmod = Counter(smod)
print(cmod)

ans = 0
for i in cmod.values():
    ans += i*(i-1)/2
print(int(ans))
S = input()

l = []
c = 0
i = 0
while i < len(S):
    for j in range(i+4,len(S)+1):
        s = S[i:j]
        if int(s)%2019 == 0:
            c += 1
            if j == len(S):
                print (c)
                exit ()
            else:
                i = j - 1
                break
    else:
        i += 1
s = input()
n_list = [0]*(len(s)+1)
res, d = 0, 1
for i in range(len(s)-1, -1, -1):
    res = (res + int(s[i])*d)%2019
    d *= 10
    n_list[len(s)-i] = res
n_list.sort()
res, ans, count = 0, 0, 1
for i in range(1, len(s)+1):
    if res == n_list[i]:
        count += 1
    else:
        if count >= 2: ans += count*(count-1)//2
        res, count = n_list[i], 1
print(ans)
N = input()
dic = {}
a = 0
bef = 0
ten = 1
for i in range(len(N)):
  num = int(N[len(N) - i -1]) % 2019#各桁取り出し
  bef = (num * ten + bef) % 2019
  #print(bef)
  dic.setdefault(bef, 0)
  dic[bef] += 1
  ten *= 10
  ten % 2019
"""for k, v in dic.items():
  if k != 0:
    if v != 1:
      a += v * (v - 1) / 2
  else:
    a += v * (v + 1) / 2"""
print(int(a))
S = input()
# print(S)

if int(S) < 2019:
    print(0)
    exit()

count = 0
for i in range(0, (len(S) - 3)):
    for j in range(i + 3, len(S)):
        number = int(S[i:j + 1])
        if number % 2019 == 0:
            print(number, i, j)
            count += 1
            break

print(count)

# for i in range(1, 101):
#     print(i, 2019 * i)

# 24228
# 2422
# 24228
s = input()
mods = []
crt = int(s[-1])
if len(s) <= 4:
    print(0)
    exit()
# for i in range(len(s)):
#     crt = crt*10+int(s[i])
#     crt %= 2019
#     mods.append(crt)
# print(mods)
for i in range(len(s)-2,-1,-1):
    crt = crt+int(s[i])*pow(10, (len(s)-i-1), 2019)
    crt %= 2019
    mods.append(crt)
ans = 0
ans += mods.count(0)
modst = set(mods)
ans += len(mods) - len(modst)
print(ans)
S = input()
X = [0]*2100
X[0] = 1
tmp = 0
p = 10
for i in range(len(S)):
    tmp = (tmp*10+int(S[i]))%2019
    p = (p*202)%2019
    X[(tmp*p)%2019] += 1
ans = 0
for i in range(len(X)):
    if X[i] >= 2:
        ans += X[i]-1

print(ans)
S = input()

for i in range(10 ** 8):
  a = 1+1
from collections import Counter

S = input()

ans = 0
mod_list = [0] * len(S)
mod_list[-1] = int(S[-1])
m = 1
for i in range(2, len(S) + 1):
    m = (10 * m) % 2019
    mod_list[-i] = (mod_list[-i + 1] + (int(S[-i]) * m)) % 2019

mod_counter = Counter(mod_list)

ans = mod_counter[0]
mod_counter[0] -= 1
for i in range(1, len(mod_list) + 1):
    num = mod_list[-i]
    mod_counter[num] -= 1
    cnt = mod_counter[num]
    ans += cnt if cnt > 0 else 0


print(ans)
def main():
    import sys
    from collections import defaultdict
    dic = defaultdict(int)

    input = sys.stdin.readline

    s = str(input().rstrip())
    m = 0

    for i in range(1,len(s)+1):
        m_ad = (int(s[-i]) * (10 ** (i - 1))) % 2019
        m = (m_ad + m) % 2019
        dic[m] += 1

    ans1 = 0

    for x in dic.values():
        if x > 1:
            ans1 = x * (x - 1) // 2
    ans2 = dic[0]

    print(ans1 +ans2)

if __name__ == "__main__":
    main()
S = input()

n = len(S)
m = 2019

S_ = S[::-1]

x = 1
total = 0
modlis = [0 for i in range(m)]

ans = 0
for i in range(n):
    modlis[total] += 1
    print("S_[i]:", S_[i])
    print("int(S_[i])*x:", int(S_[i])*x)
    print("total:", total)
    total += int(S_[i])*x
    print("total:", total)
    total %= m
    print("total:", total)
    ans += modlis[total]
    print("x:", x)
    x = x * 10 % m
    print("x:", x)

print(ans)
s=input()
a=0
m={}
for i in range(len(s)):
  b=int(s[len(s)-1-i])*10**i+a
  b=b%2019
  a=b
  if b in m:
    m[b]+=1
  else:
    m[b]=1
sum=0
for i in m:
  sum+=m[i]*(m[i]-1)/2
print(int(sum))
S = input()
count = [0] * 2019
N = len(S)
mod = 0
for i in range(N):
    mod += 10*int(S[-i])
    if mod >= 2019:
        mod %= 2019
        
    count[mod] += 1

answer = count.pop(0)

for k in range(2018):
    if count[k] > 1:
        answer = answer + count[k]*(count[k] - 1)/2

print(int(answer))
import re
import sys

s = sys.stdin.buffer.readline().rstrip().decode()
ans = 0

for i in range(1, 200001):
    tmp = str(2019*i)
    if tmp in s:
        index = -1
        while True:
            index = s.find(tmp, index + 1)
            if index == -1:
                break
            ans += 1
    if int(tmp) > int(s):
        exit()
print(ans)
S = input()
kumi = 0
count_start = 0
answer = [2019,4038,6057,8076,10095,12114,14133,16152,18171]
while count_start <= len(S) - 4:
    count_end = 4
    while count_end <= len(S):
        if count_start + 2 < count_end:
            check = int(S[count_start:count_end])
            if check in answer:
                kumi += 1
        count_end += 1
    count_start += 1
print(kumi)
s = input()
count = 0

for i in range(len(s)):
    for j in range(i+1,len(s)+1):
        a = s[i:(j*4)]
        if int(a) % 2019 == 0:
            count += 1
            
print(count)
import re
s = str(input())

s_list = []
for i in range(1, 100):
    s_list.append(str(i * 2019))

ans = 0
for search in s_list:
    start = -1
    while True:
        start = s.find(search, start + 1)
        if start != -1:
            ans += 1
        else:
            break

print(ans)
s = input()
 
counter_list = [0] * 2019
counter_list[0] = 1
cumulative_sum_list = [0] * (len(s) + 1)
 
for i in range(len(s)):
    cumulative_sum_list[i + 1] = int(s[len(s)-i-1:len(s)]) % 2019
    counter_list[cumulative_sum_list[i + 1]] += 1
 
ans = 0
 
for i in counter_list:
    ans += i * (i - 1) // 2
import collections
s = list(input())
s = list(map(int,s))
s_mod =[0]
mod = 0
for i in range(len(s)):
    a = s[len(s) - 1- i]* (10**i)
    mod += a
    mod = mod % 2019
    s_mod.append(mod)
print(s_mod)
s_values = list(collections.Counter(s_mod).values())
print(int(sum(s_values[i]*(s_values[i]-1)/2 for i in range(len(s_values)))))
a=input()

#b=int(a)

b=len(a)
sum=0
for i in range(0,b-4):
    for j in range(i+5,b+1):
        print(a[i:j])
        if int(a[i:j])%2019==0:
            sum+=1
            break
print(sum)
import sys
input = lambda: sys.stdin.readline().rstrip()

s = input()
mod = 2019
n = len(s)

d = dict()

r_list = []

for k in range(n):
    s_k = int(s[k:])
    
    r = s_k % 2019
    
    if r not in r_list:
        d.update({r:1})
        r_list.append(r)
    else:
        d[r] += 1

print(d)

ans = 0

for i in d.values():
    ans += i * (i - 1) // 2

if 0 in d.keys():
    ans += 1

print(ans)
S=input()
count=0
for i in range(1,len(S)+1):
    for j in range(i+1,len(S)+1):
        if int(S[i:j])%2019==0:
            count=count+1
print(count)
S = input()
L = len(S)
res = 0
i = L - 1
while i>=3:
    for j in range(i-3, -1, -1):
        if not int(S[j:i+1])%2019:
            res += 1
            i = j + 1
            break
    i -= 1
print(res)
str = input()
ans = 0
for x in range(len(str) - 4):
    if x + 4 < len(str) and int(str[x : x + 5]) % 2019 == 0: ans += 1
    if x + 5 < len(str) and int(str[x : x + 6]) % 2019 == 0: ans += 1
    if x + 6 < len(str) and int(str[x : x + 7]) % 2019 == 0: ans += 1
    if x + 7 < len(str) and int(str[x : x + 7]) % 2019 == 0: ans += 1
print(ans)
s = input()
ls = []
for i in range(1,1000):
    ls.append(str(i*2019))
ans = 0
for i in ls:
    ans += s.count(i)
print(ans)
N = input()
lenN = len(N)
h = lenN
cnt = 0
if lenN >= 6:
  h = lenN // 2
  
for i in range(0,h-3):
  for j in range(i + 3,h+1):
    p = int(N[i:j])
    if p % 2019 == 0:
      cnt += 1
if lenN >= 6:
  for i in range(h-3,lenN-3):
    for j in range(i + 3,lenN+1):
      p = int(N[i:j])
      if p % 2019 == 0:
        cnt += 1

print(cnt)
S = input()
 
cnt = 0
for i in range(len(S)-4):
    for j in range(i+5, len(S)+1):
        s = int(S[i:j])
        if s % 2019 == 0:
            cnt += 1
        break
print(cnt)
import re

S = str(input())

def count_o(sub, string):
    # via https://www.geeksforgeeks.org/python-count-overlapping-substring-in-a-given-string/
    count = 0
    start = 0
    while start < len(string):
        pos = string.find(sub, start)
        if pos != -1:
            start = pos + 1
            count += 1
        else:
            break
    return count

count = 0
for i in range(1, 100):
    count += count_o(str(i * 2019), S)

print(count)
S = input()
t = []
for i in range(1, 1000):
    t.append(str(2019 * i))
c = 0
for i in t:
    if S.count(i):
        a = len(i)
        for j in range(len(S) - a + 1):
            if S[j:j + a] == i:
                c += 1

print(c)
s = input()
d = [0]

def check(s, r):
    for i in range(0, len(s)-r+1):
        num = int(s[i:i+r])
        if num % 2019 == 0:
            d[0] += 1
            s = s[0:i+1] + s[i+r-1:]
            if len(s) >= r:
                check(s, r)
    if r <= 5:
        print(d[0])
        exit()
    if len(s) >= r:
        check(s, r-1)

check(s, len(s))
S = input()
ans = 0
for i in range(len(S)):
  for j in range(i,len(S)):
    ans += 1
    # if int(S[i:j+1])%2019 == 0: ans += 1
print(ans)
s = input()
cnt = 0
for l in range(len(s)):
    r = l + 4
    while r < len(s) and int(s[l:r]) % 2019 != 0:
        r += 1
    if int(s[l:r]) % 2019 == 0:
        cnt += 1
        print(l, r, s[l:r])
print(cnt)
import re
multiplies = []

for i in range (1, 800):
    multiplies.append(i * 2019)

S = input()

count = 0

for i in multiplies:
    count += len(re.findall('(?=' + str(i) + ')',S))

print(count)
# function to print the first m multiple 
# of a number n without using loop. 
def multiple(m, n,str1): 
    count=0
    a = range(n, (m * n)+1, n) 
    for i in a:
        if str(i) in str1:
            count+=1
    return count
	
# driver code 
m = 200000
n = 2019
str1=input()
print(multiple(m, n,str1))
def main():
    inputs = input()

    roop_num = len(inputs)
    if roop_num >= 100000:
        cnt = 0

    else:
        cnt = 0
        flag = False
        for start in range(roop_num-3):
            roop_num_end = roop_num - start
            ans_list = []
            ans_list = [int(inputs[start:end+start+4]) for end in range(roop_num_end-3) if int(inputs[start:end+start+4]) % 2019 == 0]

            cnt += len(ans_list)

    print(cnt)

if __name__ == '__main__':
    main()
s = input()

ans = 0
i = 0
flag = 0
while i < len(s) - 4:
    flag = 0
    for j in range(i + 5, i + 100):
        sub = int(s[i:j])
        if sub % 2019 == 0:
            ans += 1
            flag = 1
            break
    if flag == 1:
        if len(s) >= 100000:
            ans += 1
        i = j - 1
    else:
        i += 1
    

print(ans)
S = input()
length = len(S)

M = 1
while 10 ** length > 2019 * M:
    M = M + 1
print(M)

#M2019 = []
#for i in range(1,M+1):
#    M2019.append(2019*i)
#print(M2019)

count = 0
for j in range(M):
    if str(2019 * (j + 1)) in S:
        count = count + 1
    else:
        continue

print(count)
s = input()
len_s = len(s)

ans = 0
i = 0
l = 0

while l < len_s:
    l += 1
    for y in range(i, len_s):
        if int(s[i:y+1]) % 2019 == 0:
            ans += 1
            i = y
            l = y
            break
    else:
        if ans == 0:
            i += 1
        else:
            break
print(ans)
string = str(input())
n = 0
limit = len(string)-4
secondLimit = len(string)
size = len(string)-1
potencys = [0] * 1500 
potencys.append(1)
thirdLimit = size
for i in range(size, 2, -1):
  intValue = int(string[i])
  potencyIndex = 0
  thirdLimit -= 1
  for j in range(thirdLimit, -1, -1):
    potencyIndex += 1
    if potencyIndex >= len(potencys):
      potencys.append(potencys[-1]*10)
    intValue += int(string[j])* potencys[potencyIndex]
    if i-j > 2 and intValue % 673 == 0:
      n += 1
print(n)
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    s = input()
    L = list(map(str, range(2019, 2 * (10 ** 5), 2019)))
    n = len(s)

    cnt = 0
    start = 0
    for i in range(n + 1):
        for l in L:
            if l in s[start: i + 1]:
                cnt += 1
                start = i - 3
                break

    print(cnt)


if __name__ == '__main__':
    resolve()
from math import log10
n = int(input())

ans = 0
max_e = int(log10(n)) + 1

for s in range(max_e-3):
    for e in range(s+4, max_e+1):
        print((n%(10**e)) // (10**s))

        if ((n%(10**e)) // (10**s)) % 2019 == 0:
            ans += 1

print(ans)
import sys
input = sys.stdin.readline

strA = str(input())

i = len(strA)
j = 4
x = 0
for start in range(i-3):
    
  for end in range(j,i+1):
      if int(strA[start:end]) % 2019 == 0:
        x = x + 1

  j += 1
print (x)
S=input()
mem_mod = [0 for i in range(0,2019,1)]
N = len(S)
counter = 0
S_num_tmp = list(S)
S_num = list(map(int, S_num_tmp))
tmp=10

for i in range(1,N,1):
    S_num[N-i-1] = S_num[N-i]%2019 + (tmp)*S_num[N-i-1]%2019
    tmp=tmp*10
S = input()
N = len(S)


def powmod(a: int, p: int, mod: int) -> int:
    # return a**p (mod MOD) O(log p)
    if p == 0:
        return 1
    if p % 2 == 0:
        half = powmod(a, p // 2, mod)
        return half * half % mod
    else:
        return a * powmod(a, p - 1, mod) % mod


map_ = [-1] * 2019
map_[0] = 0
ans = 0
now = 0
for i in range(0, N + 1):
    now = (now + int(S[N - i - 1]) * powmod(10, i, 2019)) % 2019
    map_[now % 2019] += 1
    ans += map_[now % 2019]

print(ans)
s=input()
st=0
sums=0
for i in range(99):
    a=str(2019*(i+1))
    for j in range(len(s)-len(a)+1):
        for k in range(len(a)):
            if s[j+k]==a[k]:
                g=k
                if g==len(a)-1:
                    
                    st=st+1
            else:
                break
            
    
print(st)
s=input()
count=0
if len(s)<=3:
  print(0)
  exit()
for i in range(0,len(s)-3):
  for j in range(i+4,len(s)+1):
    s_tmp=s[i:j]
    if int(s_tmp)>=2000001:
      break
    if int(s_tmp)%2019==0:
      count+=1
print(count)
s = input()
li = []
i = 2019
while int(i) < 200000:
    i += 2019
    c = str(i)
    if c in s:
        a = [x for x in range(len(s)) if s.startswith(c, x)] 
        for b in a:
            li.append(b)
print(len(li))
def c(n):
  return (n*(n-1)//2)
  
S = int(input())
s = str(S)
a = len(s)
enbas = [0]*(a+1)
puiss = 1
for i in range(a):
  enbas[i]=((int(s[a-i-1])*puiss+enbas[i-1])%2019)
  puiss=(puiss%2019)*10
enbas.sort()
compte = 0
i = 0
avant = 0
zero = 0
for n in range(a+1):
  if enbas[n]==0:
    zero+=1
  if avant==enbas[n]:
    i+=1
  else:
    compte+=c(i)
    avant = enbas[n]
    i = 1
print(compte+zero)
def solve(s):
    N = len(s)
    ans = 0
    if N < 4:
        return 0

    for i in range(4,10):
        for j in range(N-i+1):
            print(int(s[j:j+i]))
            ans += 1 if int(s[j:j+i])%2019==0 else 0
    
    return ans

S = str(input())    
print(solve(S))
S = input()
len_S = len(S)

cnt = 0
flag = False
tmp_j = 0
for i in range(len_S-4):
    if flag:
        flag = False
        i = tmp_j
    for j in range(i+3, len_S):
        tmp = int(S[i:j+1])
        print(tmp)
        if tmp % 2019 == 0:
            cnt += 1
            tmp_j = j
            flag = True
            break



print(cnt)
s = input()

ans = 0
n = len(s)
for i in range(4, n+1):
    d, m = divmod(int(s[i-3:i]), 19)
    if m == 0:
        x1 = str(2019 * d)
        x2 = str(2019 * 100 * d)
        n1 = len(x1)
        if n1 <= i+1 and s[i-n1:i] == str(x1):
            ans += 1
        n2 = len(x2)
        if n2 <= i+1 and s[i-n2:i] == str(x2):
            ans += 1
print(ans)
s = input()
s_num = int(s)
len_s = len(s)
list=[0 for x in range(len_s+1)]
for i in range(len_s-1,-1,-1):
    for j in range(4,min(9,len_s-i+1)):
        if int(s[i:i+j])%2019==0:
            list[i]=list[i]+list[i+j]+1
print(sum(list))
S=list(input())
N = len(S)
arr = []

for i in range(N):
  a = int(int(S[i]) *(10**(N-i-1))%2019)
  arr.append(a)

arr.reverse()
def cumsum(xs):
  result = [xs[0]]
  for x in xs[1:]:
    result.append(result[-1] + x)
  return result
res = cumsum(arr)

ans = [0 for i in range(2020)]
cnt0 = 0
for i in range(N):
  a = res[i]%2019
  ans[a] += 1
  if a == 0:
    cnt0 += 1

cnt = 0
for i in range(1,1010):
  cnt += ans[i] * ans[2019-i]
  
print(ans)
cnt = int(cnt + (cnt0+1)*cnt0/2)
print(cnt)
k = 2019
s = input()
n = len(s)

numMultiples = 0
seenRemainders = [set() for _ in range(n)]

for i in range(n):
    remainder = 0
    prefixesFound = 0

    for j in range(i, n):
        remainder = (10 * remainder + int(s[j])) % k

        if remainder in seenRemainders[j]:
            break

        seenRemainders[j].add(remainder)

        if remainder == 0:
            prefixesFound += 1

    print(prefixesFound)

    numMultiples += prefixesFound * (prefixesFound + 1) // 2

print(numMultiples)
S = input()



# S = input()

start = 0

result = 0
while start <= (len(S) - 4):

    end = start + 4

    mm = False
    while end <= len(S):
        q = S[start:end]
        if int(S[start:end]) % 2019 == 0:
            result = result + 1
            start = end - 1
            mm = True
            break
        else:
            end = end + 1

    if mm == False:
        start = start + 1


print(result)
# 2019 = 3*673
MOD = 2019
S = input()
N = len(S)
X = [0]*2100
X[0] += 1
tmp = 0
hoge = pow(10,N,2019)

for i in range(N):
    tmp = (tmp*10+int(S[i]))%MOD
    hoge = (hoge*202)%MOD 
    X[(tmp*hoge)%MOD] += 1

ans = 0

for i in X:
    if i >= 2:
        ans += ((i*i-1)//2)

print(ans)
import math
s = input()
ans = 0
for i in range(len(s)):
	for j in range(i+3, len(s)):
		if math.ceil(int(s[i:j+1])) == math.floor(int(s[i:j+1])): 
			ans+=1
			#print(s[i:j+1])
print(ans)
S = input()
cnt = 0

if len(S) < 4:
  print(cnt)
  exit()

for a in range(len(S) - 4):
  d = int(S[a:a+5])
  if d % 2019 == 0:
    cnt += 1

print(cnt)
moji = input()
nagasa = len(moji)
counter = 0
for i in range(nagasa-4):
    for j in range(i+4,nagasa):
        suretsu = int(moji[i:j])
        if suretsu%2019 == 0:
            counter +=1
print(counter)
s = input()
cnt = 0
#print(s[0:1])
for i in range(1,len(s)-4):
    for j in range(i+4,len(s)+1):
        num = int(s[i:j])
        
        if num %2019 == 0:
            cnt +=1
        #print(num)
print(cnt)
s = str(input())
ans = 0
for i in range(len(s)):
    for j in range(i+4, len(s)+1):
        if int(s[i:j])%2019 == 0:
            print(int(s[i:j]))
            ans += 1
print(ans)
from collections import defaultdict

s = input()
n = len(s)
t = defaultdict(int)
f = 0
t[0] = 1
for i in range(n, -1, -1):
	v = (f + (10**((n-i)%2019) * int(s[i-1]))%2019) % 2019
	t[v] += 1
	f = v
	
res = 0
for v in t.values():
	res += (v * (v - 1) // 2)

print(res)
S=input()
mem_mod = [0 for i in range(0,2019,1)]
N = len(S)
counter = 0
S_num_tmp = list(S)
S_num = list(map(int, S_num_tmp))
tmp=10

for i in reversed(range(1,N,1)):
    #S_num[i-1] = S_num[i] + (tmp)*S_num[i-1]
    #tmp=tmp*10
    tmp = tmp
s = input()
li4 = [2019*i for i in range(1, 100) if 0 < 2019*i < 10000]
li5 = [2019*i for i in range(1, 100) if 10000 < 2019*i < 100000]
li6 = [2019*i for i in range(1, 100) if 100000 < 2019*i < 1000000]

ans = 0

for x in range(len(s)-3):
    if int(s[x:x+4]) in li4:
        ans += 1

for x in range(len(s)-4):
    if int(s[x:x+5]) in li5:
        ans += 1

for x in range(len(s)-5):
    if int(s[x:x+6]) in li4:
        ans += 1

print(ans)
import math

r = int(input())

result = 2 * r * math.pi

print(result)
import math
R = int(input())
p = math.pi
print(2*R*p)
#!/usr/bin/env python3
import sys

pi = 3.1415
def main():
    R =int(input())
    print(2 * R * pi)
    return


if __name__ == '__main__':
    main()
# A - Circle Pond
import math
import sys


def main():
    R = int(input())
    print(2 * math.pi * R)
    sys.stderr.write("debug")


if __name__ == "__main__":
    main()
import math
r = int(input())
p = math.pi
a = p * (r * 2)
print(a)
from sys import stdin, stdout
r = int(stdin.readline())
import math
c = 2*math.pi*r
stdout.write("{}\n".format(c))
import math
n = int(input())
print(n *2 * math.pi)
import math
R = int(input())
L = math.pi*2*R
print(L)
import math
a=int(input())
b=math.pi
print(2*a*b)
import math

radius = int(input())

ans = 2*radius*math.pi
print(ans)
exit()
import numpy as np
pi=np.pi
R=int(input())
print(2*pi*R)
import math

R = int(input())

ans = 2*R*math.pi

print(ans)
pi = 3.141592653589793
r = float(input())
print(2*r*pi)
r = int(input())
p = 3.141592653589793
print(2*r*p)
# print('input >>')
R  = int(input())

# print('-----output-----')
print(R * 2 * 3.1415)
import math
R = int(input())

l = 2 * R * math.pi

print(l)
#input
R = int(input())

#output
print(2*R*3.14159265)
import math
 
r = float(input())
print(r*math.pi*2)
import math


def main():
    r = int(input())
    print(2 * math.pi * r)


if __name__ == '__main__':
    main()
import numpy as np

R = int(input())
print(2*np.pi*R)
import math
def main():
    r = int(input())
    print(math.pi*r*2)

if __name__ == "__main__":
    main()
import math
 
R = int(input())
Ans = 2 * R * math.pi
 
print(Ans)
from math import pi
R = int(input())
print(R * 2 * pi)
import sys
input = sys.stdin.readline

R = int(input())
print(R * 6.28318530717958623200)
import math
LI = lambda: list(map(int,input().split()))
MI = lambda: map(int,input().split())
yes = lambda: print("YES")
no = lambda: print("NO")
I = lambda: list(input())
J = lambda x: "".join(x)
II = lambda: int(input())
SI = lambda: input()
#---khan17---template
t = int(input())
print(round(math.pi*t*2,2))
# abc163
import math

r = int(input())
ans = r*2*math.pi

print(ans)
import math 
R = int(input())

print(2*R*math.pi)
import math

r=input()
a=(int)(r)*2*math.pi
print(a)
import numpy as np
r = int(input())

print(2 * np.pi * r)
# A - Circle Pond
import math 

r = int(input())

print(r*2*math.pi)
import math
r = int(input())
print(math.pi * r* 2)
import math
r = float(input())
s = r * 2 * math.pi
print (s)
import math

r = int(input())
print(r * math.pi * 2)
r = int(input())
print(r* 2 * 3.1415)
import math
r = int(input())
print(2 * math.pi * r)
# coding: utf-8
import math

num = int(input())
print(num * math.pi * 2)
pi = 6.28318530717958623200 / 2
print(pi * int(input()) * 2)
import math
n=int(input())
res=2*math.pi*n
print(res)
import math
pi = math.pi*2
R = int(input())
print(R*pi)
import sys
def input(): return sys.stdin.readline().rstrip()
import numpy as np
def main():
    r=int(input())
    print(2*np.pi*r)

if __name__=='__main__':
    main()
R = int(input())

import math
pi = math.pi
around = 2 * R * pi
print(around)
import math


def solve():
    r = int(input())
    ans = r * 2 * math.pi
    print(ans)


if __name__ == '__main__':
    solve()
R=int(input())
C=2*3.14*R
print(C)