qyliang/CodeNanoFix huggingface dataset:
# Buggy code:
  n, p = map(int, input().split())
  s = input()


  def solve1(s, p):
      v = 0
      pow10 = 1
      ans = 0
      cnt = [0] * p
      cnt[0] = 1

      for i in range(n - 1, -1, -1):
          v = (pow10 * int(s[i]) + v) % p
          pow10 = (pow10 * 10) % p
          ans += cnt[v]
          cnt[v] += 1
      return ans


  def solve25(s, p):
      cnt = 0
      ans = 0
      for i in range(len(s) - 1, -1, -1):
          if int(s[i]) % p == 0:
              cnt += 1
          ans += cnt
      return ans



  if p in (2,5):
      print(solve25(s, p))
  else:
      print(solve1(s, p))

# Fixed code:
n, p = map(int, input().split())
s = input()


def solve1(s, p):
    v = 0
    pow10 = 1
    ans = 0
    cnt = [0] * p
    cnt[0] = 1

    for i in range(n - 1, -1, -1):
        v = (pow10 * int(s[i]) + v) % p
        pow10 = (pow10 * 10) % p
        ans += cnt[v]
        cnt[v] += 1
    return ans


def solve25(s, p):
    cnt = 0
    ans = 0
    for i in range(len(s) - 1, -1, -1):
        if int(s[i]) % p == 0:
            cnt += 1
        ans += cnt
    return ans



if p in (2,5):
    print(solve25(s, p))
else:
    print(solve1(s, p))
# Buggy code:
N, P = map(int, input().split())

S = input()

ans = 0
if P == 2 or P == 5:
    for i, s in enumerate(S):
        if int(s) % P == 0:
            ans += i + 1
else:
    counts = [0] * P
    h = 0
    d = 1
    for s in reversed(S):
        m = int(s) * d % P
        h = (h + m) % P
        counts[h] += 1
        d = (d * 10) % P
    ans = counts[0]
    for i in counts:
        ans += (i*i-1)//2

print(ans)


# Fixed code:
N, P = map(int, input().split())

S = input()

ans = 0
if P == 2 or P == 5:
    for i, s in enumerate(S):
        if int(s) % P == 0:
            ans += i + 1
else:
    counts = [0] * P
    h = 0
    d = 1
    for s in reversed(S):
        m = int(s) * d % P
        h = (h + m) % P
        counts[h] += 1
        d = (d * 10) % P
        ans = counts[0]
    for i in counts:
        ans += (i*(i-1))//2

print(ans)
# Buggy code:
n,p = map(int,input().split())
s = input()
num = 0
s1 = [0]*(n+1)
ans = 0
if p == 2 or p == 5:
	for i in range(len(s)):
		if int(s[i])%p == 0:
			ans += i+1	
	print(ans)
	exit()
ans = 0
arr = [0]*p
s = s[::-1]
z = 1
for i in range(n):
	s1[i+1] = s1[i] + int(s[i])*z
	z *=10 %p
	s1[i+1] %=p
	arr[s1[i]] += 1
arr[s1[n]]+=1
print(s1)
for i in range(p):
	ans += arr[i] * (arr[i] - 1) // 2
print(ans)


# Fixed code:
n,p = map(int,input().split())
s = input()
num = 0
s1 = [0]*(n+1)
ans = 0
if p == 2 or p == 5:
	for i in range(len(s)):
		if int(s[i])%p == 0:
			ans += i+1	
	print(ans)
	exit()
ans = 0
arr = [0]*p
s = s[::-1]
z = 1
for i in range(n):
	s1[i+1] = s1[i] + int(s[i])*z
	z = z * 10 %p
	s1[i+1] %=p
	arr[s1[i]] += 1
arr[s1[n]]+=1
#print(s1)
for i in range(p):
	ans += arr[i] * (arr[i] - 1) // 2
print(ans)
# Buggy code:
N,P=[int(s) for s in input().split()]
S=list(input())
if P!=2 and P!=5:
  ls=[0 for _ in range(N)]
  mod=[0 for _ in range(P)]
  d=10
  ls[0]=int(S[-1])
  mod[ls[0]]+=1
  for i in range(1,N):
    ls[i]=(ls[i-1]+d*int(S[-1-i]))%2019
    d=(d*10)%2019
    mod[ls[i]]+=1
  #print(ls)
  #print(mod)  
  ans=mod[0]
  for i in range(N):
    m=ls[i]
    mod[ls[i]]-=1
    ans+=mod[ls[i]]
else:
  ans=0
  for i in range(N):
    if int(S[i])%P==0:
      ans+=i+1
print(ans)
   


# Fixed code:
N,P=[int(s) for s in input().split()]
S=list(input())
if P!=2 and P!=5:
  ls=[0 for _ in range(N)]
  mod=[0 for _ in range(P)]
  d=10
  ls[0]=int(S[-1])%P
  mod[ls[0]]+=1
  for i in range(1,N):
    ls[i]=(ls[i-1]+d*int(S[-1-i]))%P
    d=(d*10)%P
    mod[ls[i]]+=1
  #print(ls)
  #print(mod)  
  ans=mod[0]
  for i in range(N):
    m=ls[i]
    mod[ls[i]]-=1
    ans+=mod[ls[i]]
else:
  ans=0
  for i in range(N):
    if int(S[i])%P==0:
      ans+=i+1
print(ans)
# Buggy code:
import sys

sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


def main():
    N, P = map(int, input().split())
    S = input()

    if P == 2 or P == 5:
        ans = 0
        for i in range(N):
            if int(S[i]) % P == 0:
                ans += i + 1
    else:
        val = [0] * P
        cur = 0
        tenfactor = 1
        val[cur] += 1
        for i in range(N):
            cur = (cur + int(S[N - i - 1]) * tenfactor) % P
            tenfactor *= 10
            tenfactor %= 10
            val[cur] += 1

        ans = 0
        for v in val:
            ans += v * (v - 1) // 2

    print(ans)


if __name__ == "__main__":
    main()


# Fixed code:
import sys

sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


def main():
    N, P = map(int, input().split())
    S = input()

    if P == 2 or P == 5:
        ans = 0
        for i in range(N):
            if int(S[i]) % P == 0:
                ans += i + 1
    else:
        val = [0] * P
        cur = 0
        tenfactor = 1
        val[cur] += 1
        for i in range(N):
            cur = (cur + int(S[N - i - 1]) * tenfactor) % P
            tenfactor *= 10
            tenfactor %= P
            val[cur] += 1

        ans = 0
        for v in val:
            ans += v * (v - 1) // 2

    print(ans)


if __name__ == "__main__":
    main()
# Buggy code:
N,P = map(int,input().split())
S = input()

if P in (2,5):
    ans = 0
    for i,c in enumerate(S):
        c = int(c)
        if c%P==0:
            ans += (i+1)
    print(ans)
else:
    ans = 0
    a = [0]
    zsq = 0
    for c in S:
        c = int(c)
        if c==0:
            zsq += 1
        else:
            ans += zsq*(zsq+1)//2
            zsq = 0
        a.append((a[-1]*10+c) % P)
    ans += zsq*(zsq+1)//2
    from collections import Counter
    ctr = Counter(a)
    for k,v in ctr.items():
        ans += v*(v-1)//2
    print(ans)

# Fixed code:
N,P = map(int,input().split())
S = input()

if P in (2,5):
    ans = 0
    for i,c in enumerate(S):
        c = int(c)
        if c%P==0:
            ans += (i+1)
    print(ans)
else:
    ans = 0
    a = [0]
    j = 1
    for c in S[::-1]:
        c = int(c)
        a.append((a[-1] + j*c) % P)
        j *= 10
        j %= P
    from collections import Counter
    ctr = Counter(a)
    for k,v in ctr.items():
        ans += v*(v-1)//2
    print(ans)
# Buggy code:
N, P = map(int, input().split())
S = input()
if P != 2 and P != 5:
    p_array = [0] * P

    mod = 0
    for s in S:
        s = int(s)
        mod = (mod * 10 + s) % P
        p_array[mod] += 1

    ans = 0
    for i, p in enumerate(p_array):
        if i == 0:
            ans += p
            ans += (p * (p-1) // 2)

    print(int(ans))

else:
    ans = 0
    for i, s in enumerate(S):
        if int(s) % P == 0:
            ans += (i+1)
    print(ans)


# Fixed code:
N, P = map(int, input().split())
S = input()

if P != 2 and P != 5:
    p_array = [0] * P
    mod = 0
    amari = 1
    for i, s in enumerate(S[::-1]):
        s = int(s)
        mod = (mod + s * amari) % P
        amari = amari * 10 % P
        p_array[mod] += 1

    ans = 0
    for i, p in enumerate(p_array):
        if i == 0:
            ans += p
        ans += (p * (p-1) // 2)

    print(int(ans))

else:
    ans = 0
    for i, s in enumerate(S):
        if int(s) % P == 0:
            ans += (i+1)
    print(ans)
# Buggy code:
n, mod = map(int, input().split())
s = input()

total = 0
if mod == 2 or mod == 5:
	for i, q in enumerate(s):
		if int(q)%mod == 0:
			total += i+1
else:
	counts = [0]*mod
	counts[0] = 1
	h = 0
	
	d = 1
	for t in reversed(s):
		m = int(s)*d%mod
		h = (h+m)%mod
		total += counts[h]
		counts[h] += 1
		d = (d*10)%mod

print(total)

# Fixed code:
n, mod = map(int, input().split())
S = input()

total = 0
if mod == 2 or mod == 5:
	for i, q in enumerate(S):
		if int(q)%mod == 0:
			total += i+1
else:
	counts = [0]*mod
	counts[0] = 1
	h = 0
	
	d = 1
	for s in reversed(S):
		m = int(s)*d%mod
		h = (h+m)%mod
		total += counts[h]
		counts[h] += 1
		d = (d*10)%mod

print(total)
# Buggy code:
from collections import Counter
n,p=map(int,input().split())
s=input()[::-1]
DP=[0]

if p==2 or p==5:
    if s[0]%p==0:print(n*(n+1)//2)
    else:print(0)
else:
    num,point=0,1
    for i in s:
        num +=int(i)*point
        num %=p
        DP.append(num)
        point *=10
        point %=p
    
    ans=0
    DP=Counter(DP)
    for v,m in DP.items():
        if m>=2:ans +=m*(m-1)//2
    print(ans)

# Fixed code:
from collections import Counter
n,p=map(int,input().split())
s=input()
DP=[0]
ans=0

if p==2 or p==5:
    for i,j in enumerate(s):
        if int(j)%p==0:
            ans +=i+1
else:
    num,point=0,1
    for i in s[::-1]:
        num +=int(i)*point
        num %=p
        DP.append(num)
        point *=10
        point %=p

    DP=Counter(DP)
    for v,m in DP.items():
        if m>=2:ans +=m*(m-1)//2
print(ans)
# Buggy code:
p = int(input().split()[1])
s = input()
if 10 % p:
  s = reversed(s)
a = enumerate(s, 1)
if 10 % p == 0:
  r = sum(i for i, x in a if x % p == 0)
else:
  d = [1] + [0] * (p - 1)
  t, y = 0, 1
  for i, x in a:
    t = (t + x * y) % p
    d[t] += 1
    y = y * 10 % p;
  r = sum(i * (i - 1) // 2 for i in d)
print(r)


# Fixed code:
I = lambda s:map(int, s)

p = int(input().split()[1])
s = input()
if 10 % p == 0:
  r = sum(i for i, x in enumerate(I(s), 1) if x % p == 0)
else:
  d = [1] + [0] * (p - 1)
  t, y = 0, 1
  for i, x in enumerate(I(reversed(s)), 1):
    t = (t + x * y) % p
    d[t] += 1
    y = y * 10 % p;
  r = sum(i * (i - 1) // 2 for i in d)
print(r)
# Buggy code:
n,p=map(int,input().split())
s=input()
r=set()
last=0
d={0:0}
total=0
rem=0
if p==2:
  for i in range(0,len(s)):
    if int(s[i])%2==0:
      total+=i+1
  print(total)
elif p==5:
  for i in range(0,len(s)):
    if int(s[i])%5==0:
      total+=i+1
  print(total)
  
  
    
else:
  power=1
  for i in range(len(s)-1,-1,-1):#handling of 0's as n and rem
    n=int(s[i])*power+rem
    power*=10
    power=power%p
    rem=n%p
    if rem in d.keys():
        d[rem]+=1
    else:
        d[rem]=1
    total+=d[rem]-1
print(total+d[0])





# Fixed code:
n, p = map(int, input().split())
s = input()
r = set()
last = 0
d = {0: 0}
total = 0
rem = 0
if p == 2:
    for i in range(0, len(s)):
        if int(s[i]) % 2 == 0:
            total += i + 1
    print(total)
elif p == 5:
    for i in range(0, len(s)):
        if int(s[i]) % 5 == 0:
            total += i + 1
    print(total)



else:
    power = 1
    for i in range(len(s) - 1, -1, -1):  # handling of 0's as n and rem
        n = int(s[i]) * power + rem
        power *= 10
        power = power % p
        rem = n % p
        if rem in d.keys():
            d[rem] += 1
        else:
            d[rem] = 1
        total += d[rem] - 1
    print(total + d[0])
# Buggy code:
from collections import deque

import numpy as np

n, p = map(int, input().split())
d = deque(input())

ans = 0
if p == 2 or p == 5:
  for i in range(n):
    k = int(d.popleft())
    if n % p == 0:
      ans += i + 1
else:
  sub = [0 for i in range(n)]
  wk = 0
  for i in range(n):
    k = int(d.pop())
    wk = (wk + k * pow(10, i, p)) % p
    sub[i] = wk
  print(sub)
  ans = 0
  dic = {}
  for i in range(n):
    if sub[i] == 0:
      ans += 1
    if sub[i] in dic.keys():
      ans += dic[sub[i]]
      dic[sub[i]] = dic[sub[i]] + 1
    else:
      dic[sub[i]] = 1

print(ans)

# Fixed code:
from collections import deque

import numpy as np

n, p = map(int, input().split())
d = deque(input())

ans = 0
if p == 2 or p == 5:
  for i in range(n):
    k = int(d.popleft())
    if k % p == 0:
      ans += i + 1
else:
  sub = [0 for i in range(n)]
  wk = 0
  for i in range(n):
    k = int(d.pop())
    wk = (wk + k * pow(10, i, p)) % p
    sub[i] = wk
  ans = 0
  dic = {}
  for i in range(n):
    if sub[i] == 0:
      ans += 1
    if sub[i] in dic.keys():
      ans += dic[sub[i]]
      dic[sub[i]] = dic[sub[i]] + 1
    else:
      dic[sub[i]] = 1

print(ans)
# Buggy code:
 n,p = map(int,input().split())
    s = input()
    l = [0 for i in range(p)]
    l[0] = 1
    ten = 1
    cnt = 0
 
    ans = 0
    if p == 2 or p == 5:
        for i in range(n):
            if int(s[i]) % p == 0:
                ans += i+1
    else:
        for i in range(n):
            cnt = (cnt + int(s[-i-1]) * ten) % p
            l[cnt] += 1
            ten = (ten * 10) % p
        for i in l:
            if i > 1:
                ans += i * (i - 1) // 2
 
    print(ans)

# Fixed code:
n,p = map(int,input().split())
s = input()
l = [0 for i in range(p)]
l[0] = 1
ten = 1
cnt = 0

ans = 0
if p == 2 or p == 5:
    for i in range(n):
        if int(s[i]) % p == 0:
            ans += i+1
else:
    for i in range(n):
        cnt = (cnt + int(s[-i-1]) * ten) % p
        l[cnt] += 1
        ten = (ten * 10) % p
    for i in l:
        if i > 1:
            ans += i * (i - 1) // 2

print(ans)
# Buggy code:
n = int(input())

ans = n /2

if n % == 0:
    print(ans)
else:
    print(ans+1)

# Fixed code:
n=int(input())

ans=int(n/2)

if n%2==0:
    print(ans)
else:
    print(ans+1)
# Buggy code:
n=int(input()
print(n//2)

if n % 2 = 0:
    print(n/2)
else:
    print(n/2+1)

# Fixed code:
n = input()

n = int(n)
if(n==2):
  print(1)
elif(n%2==0):
  print(int(n/2))
else:
  print(int(n/2)+1)
# Buggy code:
N = int(input())

if N % 2 == 0:
  res = N/2
else:
  res = N//2 + 1

print(res)

# Fixed code:
N = int(input())
if N % 2 == 0:
    print(int(N/2))
else:
    print(int(N//2)+1)
# Buggy code:
n = int(input())
if n % 2 == 0:
    print(n//2)
else:
    print(n//2)+1

# Fixed code:
n = int(input())
count = n // 2
if n % 2 == 0 :
    print(count)
else :
    count = count + 1
    print(count)
# Buggy code:
n=int(input())
a=-(-n//2)
print(n)

# Fixed code:
n = int(input())
a=int(-(-n//2))
print(a)
# Buggy code:
N = int(input())

if N % 2 != 0:
  print(N/2)
else:
  print((N/2)+1)

# Fixed code:
N = int(input())
if N % 2 == 0:
  print(int(N / 2))
else:
  print(int(N / 2 + 1))
# Buggy code:
n=input()
sei=n/2
tmp=n%2
if tmp==0:
    
else:
    sei=sei+1
print(sei)

# Fixed code:
n=int(input())
sei=int(n/2)
tmp=n%2
if tmp==0:
    sei=sei
else:
    sei=sei+1
print(sei)
# Buggy code:
N == input()
if N % 2 == 0:
  print(N/2)
else:
  print((N+1)/2)

# Fixed code:
N = int(input())
if N % 2 == 0:
  print(int(N/2))
else:
  print(int((N+1)/2))
# Buggy code:
n=int(input())
if n%2==0:
  print(n/2)
else:
  print(n//2+1)

# Fixed code:
n = int(input())
if n%2 == 0: print(n//2)
else: print((n+1)//2)
# Buggy code:
n = int(input())

print(n/2) if n%2 == 0 else print(n/2+1)

# Fixed code:
n = int(input())
print(n//2+1 if n%2!=0 else n//2)
# Buggy code:
import bisect, collections

def solution():
    n = input().strip()
    print(n//2)
    

    

def main():    
    # T = int(input().strip())
    for _ in range(1):
        solution()
    

main()

# Fixed code:
import bisect, collections

def solution():
    n = input().strip()
    print((int(n)+1)//2)
    

    

def main():    
    # T = int(input().strip())
    for _ in range(1):
        solution()
    

main()
# Buggy code:
N = int(input())
ans = N//2 if N%2==0 else N//2+1
print(N//2)


# Fixed code:
N = int(input())
ans = N//2 if N%2==0 else N//2 + 1
print(ans)
# Buggy code:
import math

N = input()
print(math.ceil(N/2))

# Fixed code:
import math
 
N = float(input())
print(math.ceil(N/2))
# Buggy code:
import math 
n=int(input())
print(math.ceil(n/2)

# Fixed code:
n = int(input())

import math

print(math.ceil(n/2))
# Buggy code:
N = int(input())
n = int(N/2)
print(n+1)

# Fixed code:
N = int(input())
print(int((N+1)/2))
# Buggy code:
i = int(input())

if i // 2 == 0:
  print(int(i/2))
else:
  print(int(i/2 + 1))

# Fixed code:
i = int(input())

if i % 2 == 0:
  print(int(i/2))
else:
  print(int(i/2) +1)
# Buggy code:
N = int(input())
if N % 2 == 0:
  print(N/2)
else:
  print((N+1)/2)


# Fixed code:
N = int(input())
print(N // 2 if N % 2 == 0 else (N + 1) // 2)
# Buggy code:
N = input()
N = int(S)
A = N / 2
B = (N + 1) / 2
if N % 2 == 0:
  print(A)
else:
  print(B)


# Fixed code:
N = int(input())
A = N / 2
A = int(A)
B = (N + 1) / 2
B = int(B)
if N % 2 == 0:
  print(A)
else:
  print(B)
# Buggy code:
print(int((int(input()+1))/2))

# Fixed code:
print( int( (int(input()) + 1 )/2 ) )
# Buggy code:
N =int(input())
if N%2 == 0:
    print(N/2)
else:
    print(int(N/2)+1)

# Fixed code:
N = int(input())

if N%2==0:
    print(int(N/2))
else:
    print(int((N+1)/2))
# Buggy code:
n=int(input())

if 0==n/2:
  n=n/2
  print(n)
else:
  n=n//2+1
  print(n)

# Fixed code:
n=int(input())

if n%2==0:
  n=n/2
  print(int(n))
else:
  n=n//2+1
  print(int(n))
# Buggy code:
if N%2 == 0:
  print(int(N/2))
else:
  print(int(N+1/2))

# Fixed code:
N = int(input())
if N % 2 == 0:
  N = N / 2
else:
  N  = (N + 1) / 2
print(int(N))
# Buggy code:
N = input()
if N%2 ==0:
  print(N/2)
else:
  print(N/2 + 1)

# Fixed code:
N = input()
intN=int(N)
if intN%2 == 0:
    print(intN//2)
else:
    print(intN//2 +1)
# Buggy code:
n = int(input())

if n % 2 == 0:
  print(n/2)
else:
  print((n//2) +1)

# Fixed code:
n = int(input())
if (n % 2 == 0):
  print(n//2)
else:
  print(n//2+1)
# Buggy code:
n = int(input())
if (n % 2 == 1):
    print(n // 2 + 1)
else:
    print(n / 2)

# Fixed code:
n = int(input())
if n%2:
  print(int(n/2) + 1)
else:
  print(int(n/2))
# Buggy code:
N=int(input())
a=N%2
if a == 0:
  print(N/2)
else:
  print((N+1)/2)

# Fixed code:
N = int(input())

if N%2 == 0:
  print(int(N/2))
else:
  print(int((N/2))+1)
# Buggy code:
N=int(input())
ans=N//2+1
print(ans)

# Fixed code:
N=int(input())
ans =(N+1)//2
print(ans)
# Buggy code:
n=int(input())

if n % 2 ==0:
    print(n/2)
else:
    print((n-1)/2+1)

# Fixed code:
n=int(input())

if n % 2 == 0:
    print(int(n/2))
else:
    print(int((n-1)/2+1))
# Buggy code:
N = int(input())
if N % ==1:
  print(int(N/2+1))
elif N %  ==0:
  print(int(N/2))

# Fixed code:
N = int(input())

if N % 2 == 1:
  print(int(N/2+1))
elif N % 2 == 0:
  print(int(N/2))
# Buggy code:
n = int(input())
print(n // 2 + n % 1)

# Fixed code:
n = int(input())
print(n//2+n%2)
# Buggy code:
N,R= map(int,input().split())
if N > 9:
    print(R)
else:
    print(R-10*(10-N))

# Fixed code:
N,R= map(int,input().split())
if N > 9:
    print(R)
else:
    print(R+100*(10-N))
# Buggy code:
, R = map(int, input().split())

if N > 10:
    print(R)
else:
    print(R+100*(10-N))

# Fixed code:
N, R = input().split()
print(R if int(N) >= 10 else int(R)+100*(10-int(N)))
# Buggy code:
N, R = map(int, input().split())

if N < 10:
    print(R - 100 * (10 - N))
else:
    print(R)

# Fixed code:
N,R = map(int,input().split())
if N < 10:
    print(R + (100*(10-N)))
else:
    print(R)
# Buggy code:
n,r=map(int,input().split())
if n<=10:
  print(r-100*(10-n))
else:
  print(r)

# Fixed code:
n, r = map(int, input().split())

if n < 10:
    print(r + (10-n) * 100)
else:
    print(r)
# Buggy code:
N,R = list(map(int,input().split()))

if N >= 10:
  print(R)
else:
  print(100*(10-N))

# Fixed code:
N,R = map(int,input().split())
if N > 10: print (R)
else:
    print (R+(100*(10-N)))
# Buggy code:
n,r = map(int,input().split())
if n < 10:
    print(r+100*(10-n))
else:
    print(n)

# Fixed code:
n, r = map(int, input().split())

if n <= 10:
    print(100 * (10 - n) + r)
else:
    print(r)
# Buggy code:
n,r = map(int,input().split())
print(r if n >= 10 else r - 100*(10-n))

# Fixed code:
n, r = map(int, input().split())

if n > 10:
    print(r)
else:
    print(r + 100 * (10 - n))
# Buggy code:

n,m = map(int.input().split())
if n < 10:
    print(m+(100*(10-n)))
else:
   print(m)

# Fixed code:
n,m = map(int,input().split())
if n < 10:
    print(m+(100*(10-n)))
else:
   print(m)
# Buggy code:
n,r=map(int,input().split())
if n>10:
	print(r)
else:
	print(r-1000+100*n)


# Fixed code:
n, r = map(int,input().split())
print(r) if n >= 10 else print(100 * (10 - n) + r)
# Buggy code:
N, R = map(int, input().split())

if N >= 10:
  print(R)
else:
  print(R-(100*(10-N)))

# Fixed code:
N,R =map(int,input().split())

if  N >= 10:
  print(R)
  
else:
  print(R + 100*(10-N))
# Buggy code:
n, r = map(int,input().split())

if r<10:
  print(100*(10-n))
else:
  print(r)

# Fixed code:
n,r = map(int, input().split())
if n <10:
    print(r + (10-n)*100)
else:
    print(r)
# Buggy code:
a, b = input().split()
if int(a) < 9:
  ans = int(b) - 100 * (10 - int(a))
  print(ans)
else:
  print(b)



# Fixed code:
a, b = input().split()
if int(a) <= 9:
  ans = int(b) + 100 * (10 - int(a))
  print(ans)
else:
  print(b)
# Buggy code:
N,R=map(int,input().split())

if N>=10:
    print(R)
else:
    print(100*(10-N))

# Fixed code:
N, R = map(int, input().split())
if N >= 10:
    print(R)
else:
    print(R + (1000 - (100 * N)))
# Buggy code:
a= list(map(int, input().split()))
if a[0]<10:
  print(a[1]-100*(10-a[0])
else:
  print(a[1])

# Fixed code:
a = list(map(int, input().split()))
if a[0]< 10:
    print (a[1]+100*(10-a[0]))
else:
    print (a[1])
# Buggy code:
n, r = map(int, input().split())
if n >= 10:
  print(r)
else:
  print(r + 100 * (10 - r))

# Fixed code:
n,r = map(int,input().split())
if n >=10:
    print(r)
else:
    print(r+100*(10-n))
# Buggy code:
n, r = map(int, input().split())

if n >= 10:
    print(r)
else:
    print(r - (100*(10 - n)))


# Fixed code:
n,r = map(int, input().split())

if n>= 10:
  print (r)
else:
  print (r+100*(10-n))
# Buggy code:
n, r = map(int, input().split())
if n >= 10:
    print(r)
else:
    print(100*(10-n))

# Fixed code:
n, r = map(int, input().split())

if n >= 10:
    print(r)
else:
    rate = r + 100 * (10 - n)
    print(rate)
# Buggy code:
n,r = map(int,input().split())
if n >= 10:
  print(r)
else:
  ans = r+ (100*(10-k))
  print(ans)

# Fixed code:
n, r = map(int, input().split())

if n >= 10:
    print(r)
else:
    print(r + ((10 - n) * 100))
# Buggy code:
N, R = map(int,input().split())
if N >= 10 :
  print(R)
else:
  print(100*(10-R))



# Fixed code:
N,R=map(int,input().split())

if N >= 10:
    print(R)
else:
    ans = R+100*(10-N)
    print(ans)
# Buggy code:
i = input().split()
n = int(i[0])
r = int(i[1])

if n >= 10:
  print(n)
else:
  print(r + 100*(10-n))

# Fixed code:
i = input().split()
n = int(i[0])
r = int(i[1])

if n >= 10:
  print(r)
else:
  print(r + 100*(10-n))
# Buggy code:
from sys import stdin

N, R = [int(x) for x in stdin.readline().rstrip().split()]

if N >= 10:
    print(R)
else:
    print(R - (100*(10 - N)))
    


# Fixed code:
from sys import stdin

N, R = [int(x) for x in stdin.readline().rstrip().split()]

if N >= 10:
    print(R)
else:
    print(R + (100*(10 - N)))
# Buggy code:
N,R = map(int,input().split())
if N >= 10:
  print(R)
else:
  print(R+100*(100-N))
   

# Fixed code:
N, R = map(int, input().split())
if N < 10:
  print(R + 100*(10-N))
else:
  print(R)
# Buggy code:
n, r = map(int, input().split())

if n >= 10:
    print(r)
else:
    print(r + 100 * (10 - 2n))


# Fixed code:
n,r=map(int,input().split())
if n>=10 :
    print(r)
else : 
    print(r+100*(10-n))
# Buggy code:
N,R=map(int,input().split())
if N>=10:
    print(R)
else:
    print(R-100*(10-N))

# Fixed code:
N,R = map(int,input().split())
if N >=10:
  print(R)
else:
  print(R+100*(10-N))
# Buggy code:
n,r = map(int,input().split())

if n > =10:
  print(r)

else:
  print(r-100*(10-n))

# Fixed code:
n, r = map(int, input().split())

if n >= 10:
    print(r)
else:
    a = 100 * (10 - n)
    print(r + a)
# Buggy code:
n,r = map(int(input(),split()))
if n < 10 :
  print(100 * (10 - n) + r)
else:
  print(r)

# Fixed code:
n,r = map(int, input().split())
if n < 10:
    ans = r + 100 * (10 - n)
else:
    ans = r
print(ans)
# Buggy code:
from sys import stdin


def get_result(data):
    print(data)
    N, R = data
    return int(N + 100 * (10 - R))

if __name__ == '__main__':
    data = list(map(int, stdin.readline().split(' ')))
    result = get_result(data)
    print(result)


# Fixed code:
from sys import stdin


def get_result(data):
    N, R = data
    if N < 10:
        return R + 100 * (10 - N)
    
    return R

if __name__ == '__main__':
    data = list(map(int, stdin.readline().split(' ')))
    result = get_result(data)
    print(result)
# Buggy code:
n,r = map(int,input().split())

if n >= 10:
	print(r)
else:
	r -= 100*(10-n)
    print(r)

# Fixed code:
n, r = map(int, input().split())
if n >= 10:
  print(r)
else:
  print(100*(10-n)+r)