#ABC156 - Virtual
sel='A'
#A
if sel=='A':
    N,R=map(int,input().split())
    if N>=10:
        print(R)
    else:
        print(R+100*(10-N))
#B
if sel=='B':
    N,K=map(int,input().split())
    cnt=0
    while N>0:
        N//=K
        cnt+=1
    print(cnt)

#C
if sel=='C':
    def ceilT(a,b): #ceil(a/b)
        return (a+b-1)//b

    N=int(input())
    X=[int(i) for i in input().split()]
    p=ceilT(sum(X),N)
    ans=sum((x-p)**2 for x in X)
    p-=1
    ans=min(ans,sum((x-p)**2 for x in X))
    print(ans)



 sel='A' sel 'A' if sel=='A':
    N,R=map(int,input().split())
    if N>=10:
        print(R)
    else:
        print(R+100*(10-N))
#B sel=='A' sel 'A' N,R=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split R if N>=10:
        print(R)
    else:
        print(R+100*(10-N))
#B N>=10 N 10 print(R) print R print(R+100*(10-N)) print R+100*(10-N) R 100*(10-N) 100 10-N 10 N if sel=='B':
    N,K=map(int,input().split())
    cnt=0
    while N>0:
        N//=K
        cnt+=1
    print(cnt)

#C sel=='B' sel 'B' N,K=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K cnt=0 cnt 0 while N>0:
        N//=K
        cnt+=1
     N>0 N 0 N//=K N K cnt+=1 cnt 1 print(cnt) print cnt if sel=='C':
    def ceilT(a,b): #ceil(a/b)
        return (a+b-1)//b

    N=int(input())
    X=[int(i) for i in input().split()]
    p=ceilT(sum(X),N)
    ans=sum((x-p)**2 for x in X)
    p-=1
    ans=min(ans,sum((x-p)**2 for x in X))
    print(ans) sel=='C' sel 'C' def ceilT(a,b): #ceil(a/b)
        return (a+b-1)//b

     ceilT return (a+b-1)//b (a+b-1)//b a+b-1 a+b a b 1 b a a b b N=int(input()) N int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i X=[int(i) for i in input().split()] X [int(i) for i in input().split()] p=ceilT(sum(X),N) p ceilT(sum(X),N) ceilT sum(X) sum X N ans=sum((x-p)**2 for x in X) ans sum((x-p)**2 for x in X) sum (x-p)**2 x-p x p 2 p-=1 p 1 ans=min(ans,sum((x-p)**2 for x in X)) ans min(ans,sum((x-p)**2 for x in X)) min ans sum((x-p)**2 for x in X) sum (x-p)**2 x-p x p 2 print(ans) print ans N,R=map(int,input().split()) map(int,input().split()) N N=int(input()) int(input()) N sel='A' 'A' sel N//=K K N ans=min(ans,sum((x-p)**2 for x in X)) min(ans,sum((x-p)**2 for x in X)) ans K=map(int,input().split()) map(int,input().split()) K ans=sum((x-p)**2 for x in X) sum((x-p)**2 for x in X) ans N,K=map(int,input().split()) map(int,input().split()) N def ceilT(a,b): #ceil(a/b)
        return (a+b-1)//b

     def ceilT(a,b): #ceil(a/b)
        return (a+b-1)//b

     ceilT R=map(int,input().split()) map(int,input().split()) R X=[int(i) for i in input().split()] [int(i) for i in input().split()] X p-=1 1 p cnt=0 0 cnt cnt+=1 1 cnt p=ceilT(sum(X),N) ceilT(sum(X),N) p
#ABC156 - Virtual
sel='A'
#A
if sel=='A':
    N,R=map(int,input().split())
    if N>=10:
        print(R)
    else:
        print(R+100*(10-N))
#B
if sel=='B':
    N,K=map(int,input().split())
    cnt=0
    while N>0:
        N//=K
        cnt+=1
    print(cnt)

#C
if sel=='C':
    def ceilT(a,b): #ceil(a/b)
        return (a+b-1)//b

    N=int(input())
    X=[int(i) for i in input().split()]
    p=ceilT(sum(X),N)
    ans=sum((x-p)**2 for x in X)
    p-=1
    ans=min(ans,sum((x-p)**2 for x in X))
    print(ans)




