CodeEff/ECCO huggingface dataset:
# Original solution
def dfs(a,i,j,rest,vis):
  if i<0 or len(a)<=i or j<0 or len(a[i])<=j: return False
  if a[i][j]<0 or rest<a[i][j] or vis[i][j]: return False
  vis[i][j]=1
  rest-=a[i][j]
  if rest==0:
    if start(a,vis):
      return True
  else:
    for di,dj in zip([-1,1,0,0],[0,0,-1,1]):
      if dfs(a,i+di,j+dj,rest,vis):
        return True
  vis[i][j]=0
  return False

def start(a,vis):
  for i in range(len(a)):
    for j in range(len(a[i])):
      if a[i][j]<0 and not vis[i][j]:
        vis[i][j]=1
        for di,dj in zip([-1,1,0,0],[0,0,-1,1]):
          if dfs(a,i+di,j+dj,-a[i][j],vis):
            return True
        vis[i][j]=0
        return False
  return True

while 1:
  n=int(eval(input()))
  if n==0: break
  a=[list(map(int,input().split())) for _ in range(n)]

  if sum(x for row in a for x in row):
    print("NO")
    continue

  vis=[[0]*n for _ in range(n)]
  print(("YES" if start(a,vis) else "NO"))

# Optimized solution
def dfs(a,i,j,ss,si,rest,vis):
  if i<0 or len(a)<=i or j<0 or len(a[i])<=j or vis[i][j]: return False
  if a[i][j]<0 and (i,j)==ss[si]:
    vis[i][j]=1
    for di,dj in zip([-1,1,0,0],[0,0,-1,1]):
      if dfs(a,i+di,j+dj,ss,si,-a[i][j],vis):
        return True
    vis[i][j]=0
  elif a[i][j]>0 and rest>=a[i][j]:
    rest-=a[i][j]
    vis[i][j]=1
    if rest==0:
      if si+1==len(ss): return True
      ni,nj=ss[si+1]
      if dfs(a,ni,nj,ss,si+1,-a[i][j],vis):
        return True
    else:
      for di,dj in zip([-1,1,0,0],[0,0,-1,1]):
        if dfs(a,i+di,j+dj,ss,si,rest,vis):
          return True
    vis[i][j]=0
  return False

while 1:
  n=int(eval(input()))
  if n==0: break
  a=[list(map(int,input().split())) for _ in range(n)]

  if sum(x for row in a for x in row):
    print("NO")
    continue

  ss=[(i,j) for i in range(n) for j in range(n) if a[i][j]<0]
  vis=[[0]*n for _ in range(n)]
  i,j=ss[0]
  print(("YES" if dfs(a,i,j,ss,0,-a[i][j],vis) else "NO"))
# Original solution
def dfs(a,i,j,ss,si,rest,vis):
  if i<0 or len(a)<=i or j<0 or len(a[i])<=j or vis[i][j]: return False
  if a[i][j]<0 and (i,j)==ss[si]:
    vis[i][j]=1
    for di,dj in zip([-1,1,0,0],[0,0,-1,1]):
      if dfs(a,i+di,j+dj,ss,si,-a[i][j],vis):
        return True
    vis[i][j]=0
  elif a[i][j]>0 and rest>=a[i][j]:
    rest-=a[i][j]
    vis[i][j]=1
    if rest==0:
      if si+1==len(ss): return True
      ni,nj=ss[si+1]
      if dfs(a,ni,nj,ss,si+1,-a[i][j],vis):
        return True
    else:
      for di,dj in zip([-1,1,0,0],[0,0,-1,1]):
        if dfs(a,i+di,j+dj,ss,si,rest,vis):
          return True
    vis[i][j]=0
  return False

while 1:
  n=int(eval(input()))
  if n==0: break
  a=[list(map(int,input().split())) for _ in range(n)]

  if sum(x for row in a for x in row):
    print("NO")
    continue

  ss=[(i,j) for i in range(n) for j in range(n) if a[i][j]<0]
  vis=[[0]*n for _ in range(n)]
  i,j=ss[0]
  print(("YES" if dfs(a,i,j,ss,0,-a[i][j],vis) else "NO"))

# Optimized solution
di=(-1,1,0,0)
dj=(0,0,-1,1)

def solve(a,ss,i,j,si,rest,vis):
  n=len(a)
  if i<0 or n<=i or j<0 or n<=j or vis[i][j]: return False
  if a[i][j]<0:
    if ss[si]!=(i,j): return False
    vis[i][j]=-1-si
    for k in range(4):
      ni,nj=i+di[k],j+dj[k]
      if solve(a,ss,ni,nj,si,rest,vis): return True
    vis[i][j]=0
  else:
    if rest<a[i][j]: return False
    vis[i][j]=-1-si
    rest-=a[i][j]
    if rest==0:
      si+=1
      if si==len(ss): return True
      ni,nj=ss[si]
      if solve(a,ss,ni,nj,si,-a[ni][nj],vis): return True
    else:
      for k in range(4):
        ni,nj=i+di[k],j+dj[k]
        if solve(a,ss,ni,nj,si,rest,vis): return True
    vis[i][j]=0
  return False

while 1:
  n=int(eval(input()))
  if n==0: break
  a=[list(map(int,input().split())) for _ in range(n)]

  if sum(x for row in a for x in row):
    print("NO")
    continue

  ss=[(i,j) for i in range(n) for j in range(n) if a[i][j]<0]
  vis=[[0]*n for _ in range(n)]
  i,j=ss[0]
  if solve(a,ss,i,j,0,-a[i][j],vis):
    print("YES")
  else:
    print("NO")
# Original solution
x = int(eval(input()))


if x < 600:
    print("8")
elif x < 800:
    print("7")
elif x < 1000:
    print("6")
elif x < 1200:
    print("5")
elif x < 1400:
    print("4")
elif x < 1600:
    print("3")
elif x < 1800:
    print("2")
elif x < 2000:
    print("1")

# Optimized solution
x = int(eval(input()))
for i in range(2,10):
    if i <= x/200 < i+1:
        print((10-i))
# Original solution
#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections
from decimal import Decimal # 10進数で考慮できる

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

X = int(eval(input()))
if 599 >= X:
    ans = 8
elif 600 <= X <= 799:
    ans = 7
elif 800 <= X <= 999:
    ans = 6
elif 1000 <= X <= 1199:
    ans = 5
elif 1200 <= X <= 1399:
    ans = 4
elif 1400 <= X <= 1599:
    ans = 3
elif 1600 <= X <= 1799:
    ans = 2
else:
    ans = 1
print((str(ans)))

# Optimized solution
#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections
from decimal import Decimal # 10進数で考慮できる

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

# X = int(input())
# if 599 >= X:
#     ans = 8
# elif 600 <= X <= 799:
#     ans = 7
# elif 800 <= X <= 999:
#     ans = 6
# elif 1000 <= X <= 1199:
#     ans = 5
# elif 1200 <= X <= 1399:
#     ans = 4
# elif 1400 <= X <= 1599:
#     ans = 3
# elif 1600 <= X <= 1799:
#     ans = 2
# else:
#     ans = 1
# print(str(ans))

X = int(eval(input()))
print((8 - (X - 400) // 200))
# Original solution
x = int(eval(input()))
lank8 = list(range(400, 600))
lank7 = list(range(400, 800))
lank6 = list(range(400, 1000))
lank5 = list(range(400, 1200))
lank4 = list(range(400, 1400))
lank3 = list(range(400, 1600))
lank2 = list(range(400, 1800))
lank1 = list(range(400, 2000))
if x in lank8:
    print((8))
elif x in lank7:
    print((7))
elif x in lank6:
    print((6))
elif x in lank5:
    print((5))
elif x in lank4:
    print((4))
elif x in lank3:
    print((3))
elif x in lank2:
    print((2))
elif x in lank1:
    print((1))


# Optimized solution
x = int(eval(input()))
print((10 - x // 200))
# Original solution
n=int(eval(input()))
if n<600:
    print((8))
elif n<800:
    print((7))
elif n<1000:
    print((6))
elif n<1200:
    print((5))
elif n<1400:
    print((4))
elif n<1600:
    print((3))
elif n<1800:
    print((2))
else:
    print((1))


# Optimized solution
n=int(eval(input()))
print((abs(n-2199)//200))
# Original solution
n=int(eval(input()))
print((abs(n-2199)//200))

# Optimized solution
print((abs(int(eval(input()))-2199)//200))
# Original solution
print((8-(int(eval(input()))-400)//200))

# Optimized solution
x=int(eval(input()))
ans=8
x-=400
ans-=x//200
print(ans)
# Original solution
x = int(eval(input()))

if 400 <= x <= 599:
  print('8')
elif 600 <= x <= 799:
  print('7')
elif 800 <= x <= 999:
  print('6')
elif 1000 <= x <= 1199:
  print('5')
elif 1200 <= x <= 1399:
  print('4')
elif 1400 <= x <= 1599:
  print('3')
elif 1600 <= x <= 1799:
  print('2')
else:
  print('1')

# Optimized solution
print((10 - int(eval(input()))//200))
# Original solution
# -*- coding: utf-8 -*-


def main():
    import sys
    input = sys.stdin.readline

    x = int(eval(input()))

    if x >= 1800:
        print('1')
    elif x >= 1600:
        print('2')
    elif x >= 1400:
        print('3')
    elif x >= 1200:
        print('4')
    elif x >= 1000:
        print('5')
    elif x >= 800:
        print('6')
    elif x >= 600:
        print('7')
    elif x >= 400:
        print('8')


if __name__ == '__main__':
    main()


# Optimized solution
# -*- coding: utf-8 -*-


def main():
    import sys
    input = sys.stdin.readline

    x = int(eval(input()))

    print((10 - x // 200))


if __name__ == '__main__':
    main()
# Original solution
n = int(eval(input()))

if 400 <=n <=599:
    print((8))
elif 600 <=n <= 799:
    print((7))
elif 800 <=n <=999:
    print((6))
elif 1000 <=n<=1199:
    print((5))
elif 1200 <=n <=1399:
    print((4))
elif 1400<= n <=1599:
    print((3))
elif 1600 <=n <=1799:
    print((2))
elif 1800<= n <=1999:
    print((1)) 

# Optimized solution
a = 400
b = 199
L1= []
L2 = []
for i in range(8):
    L1.append(a+200*(i))
    L2.append(a+200*(i)+b)


n = int(eval(input()))
for i in range(8):
    if L1[i] <= n <= L2[i]:
        print((8-i))
# Original solution
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    x = int(readline())
    kyu = 0

    if 400 <= x <= 599:
        kyu = 8
    if 600 <= x <= 799:
        kyu = 7
    if 800 <= x <= 999:
        kyu = 6
    if 1000 <= x <= 1199:
        kyu = 5
    if 1200 <= x <= 1399:
        kyu = 4
    if 1400 <= x <= 1599:
        kyu = 3
    if 1600 <= x <= 1799:
        kyu = 2
    if 1800 <= x <= 1999:
        kyu = 1

    print(kyu)


if __name__ == '__main__':
    main()


# Optimized solution
x = int(eval(input()))
y = x // 200
print((10 - y))
# Original solution
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(eval(input()))
def MAP(): return list(map(int, input().split()))
def LIST(): return list(map(int, input().split()))
def ZIP(n): return list(zip(*(MAP() for _ in range(n))))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

X = INT()

if 400 <= X < 600:
    print((8))
elif 600 <= X < 800:
    print((7))
elif 800 <= X < 1000:
    print((6))
elif 1000 <= X < 1200:
    print((5))
elif 1200 <= X < 1400:
    print((4))
elif 1400 <= X < 1600:
    print((3))
elif 1600 <= X < 1800:
    print((2))
elif 1800 <= X < 2000:
    print((1))


# Optimized solution
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(eval(input()))
def MAP(): return list(map(int, input().split()))
def LIST(): return list(map(int, input().split()))
def ZIP(n): return list(zip(*(MAP() for _ in range(n))))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

X = INT()
l = [400, 600, 800, 1000, 1200, 1400, 1600, 1800]
print((9-bisect(l, X)))
# Original solution
x = int(eval(input()))

if 400 <= x < 600:
    print((8))
elif 600 <= x < 800:
    print((7))
elif 800 <= x < 1000:
    print((6))
elif 600 <= x < 1200:
    print((5))
elif 1200 <= x < 1400:
    print((4))
elif 1400 <= x < 1600:
    print((3))
elif 1600 <= x < 1800:
    print((2))
elif 1800 <= x < 2000:
    print((1))

# Optimized solution
x = int(eval(input()))

print((10 - x//200))
# Original solution
# -*- coding: utf-8 -*-
# 標準入力を取得
X = int(eval(input()))

# 求解処理
ans = int()
if X <= 599:
    ans = 8
elif X <= 799:
    ans = 7
elif X <= 999:
    ans = 6
elif X <= 1199:
    ans = 5
elif X <= 1399:
    ans = 4
elif X <= 1599:
    ans = 3
elif X <= 1799:
    ans = 2
elif X <= 1999:
    ans = 1

# 結果出力
print(ans)

# Optimized solution
# -*- coding: utf-8 -*-

def get_input() -> tuple:
    """
    標準入力を取得する.

    Returns:\n
        tuple: 標準入力
    """
    X = int(eval(input()))

    return X

def main(X: int) -> None:
    """
    メイン処理.

    Args:\n
        X (int): 最高レーティング（400 <= X <= 1999）
    """
    # 求解処理
    ans = 10 - (X // 200)

    # 結果出力
    print(ans)

if __name__ == "__main__":
    # 標準入力を取得
    X = get_input()

    # メイン処理
    main(X)
# Original solution
x = int(eval(input()))
if x >= 400 and x < 600:
    print((8))
elif x >= 600 and x < 800:
    print((7))
elif x >= 800 and x < 1000:
    print((6))
elif x >= 1000 and x < 1200:
    print((5))
elif x >= 1200 and x < 1400:
    print((4))
elif x >= 1400 and x < 1600:
    print((3))
elif x >= 1600 and x < 1800:
    print((2))
else:
    print((1))


# Optimized solution
x = int(eval(input()))
a = x // 200
print(((8 - a) + 2))
# Original solution
a = int(eval(input()))
if 400 <= a <= 599:
    print((8))
elif 600 <= a <= 799:
    print((7))
elif 800 <= a <= 999:
    print((6))
elif 1000 <= a <= 1199:
    print((5))
elif 1200 <= a <= 1399:
    print((4))
elif 1400 <= a <= 1599:
    print((3))
elif 1600 <= a <= 1799:
    print((2))
elif 1800 <= a <= 1999:
    print((1))

# Optimized solution
print((10 - int(eval(input())) // 200))
# Original solution
x=int(eval(input()))
l=[[600,8],[800,7],[1000,6],[1200,5],[1400,4],[1600,3],[1800,2],[2000,1]]

for m in l:
  if x<m[0]:
    print((m[1]))
    break

# Optimized solution
x=int(eval(input()))
for i in range(3,11):
  if x<i*200:
    print((11-i))
    break
# Original solution
print((8 - (int(eval(input())) - 400) // 200))


# Optimized solution
print((10 - int(eval(input())) // 200))
# Original solution
X = int(eval(input()))
if X < 600:
    print((8))
elif X < 800:
    print((7))
elif X < 1000:
    print((6))
elif X < 1200:
    print((5))
elif X < 1400:
    print((4))
elif X < 1600:
    print((3))
elif X < 1800:
    print((2))
else:
    print((1))

# Optimized solution
X = int(eval(input()))
ans = 8 - (X - 400)//200
print(ans)
# Original solution
X=int(eval(input()))
if X<600:
    print((8))
elif X<800:
    print((7))
elif X<1000:
    print((6))
elif X<1200:
    print((5))
elif X<1400:
    print((4))
elif X<1600:
    print((3))
elif X<1800:
    print((2))
elif X<2000:
    print((1))

# Optimized solution
X=int(eval(input()))
print((10-X//200))
# Original solution
a = int(eval(input()))
b = int(a//200)
if b == 2:
  print((8))
elif b == 3:
  print((7))
elif b== 4:
  print((6))
elif b== 5:
  print((5))
elif b==6:
  print((4))
elif b==7:
  print((3))
elif b==8:
  print((2))
elif b==9:
  print((1))
  
 

# Optimized solution
a=int(eval(input()))
b=a//200
if b==2:
  print((8))
elif b==3:
  print((7))
elif b==4:
  print((6))
elif b==5:
  print((5))
elif b==6:
  print((4))
elif b==7:
  print((3))
elif b==8:
  print((2))
elif b==9:
  print((1))
# Original solution
import sys,bisect,string,math,time,functools,random,fractions
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
from itertools import permutations,combinations,groupby
rep=range;R=range
def Golf():n,*t=map(int,open(0).read().split())
def I():return int(input())
def S_():return input()
def IS():return input().split()
def LS():return [i for i in input().split()]
def MI():return map(int,input().split())
def LI():return [int(i) for i in input().split()]
def LI_():return [int(i)-1 for i in input().split()]
def NI(n):return [int(input()) for i in range(n)]
def NI_(n):return [int(input())-1 for i in range(n)]
def StoLI():return [ord(i)-97 for i in input()]
def ItoS(n):return chr(n+97)
def LtoS(ls):return ''.join([chr(i+97) for i in ls])
def RA():return map(int,open(0).read().split())
def GI(V,E,ls=None,Directed=False,index=1):
    org_inp=[];g=[[] for i in range(V)]
    FromStdin=True if ls==None else False
    for i in range(E):
        if FromStdin:
            inp=LI()
            org_inp.append(inp)
        else:
            inp=ls[i]
        if len(inp)==2:
            a,b=inp;c=1
        else:
            a,b,c=inp
        if index==1:a-=1;b-=1
        aa=(a,c);bb=(b,c);g[a].append(bb)
        if not Directed:g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'#':1,'.':0},boundary=1):
    #h,w,g,sg=GGI(h,w,search=['S','G'],replacement_of_found='.',mp_def={'#':1,'.':0},boundary=1) # sample usage
    mp=[boundary]*(w+2);found={}
    for i in R(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[boundary]+[mp_def[j] for j in s]+[boundary]
    mp+=[boundary]*(w+2)
    return h+2,w+2,mp,found
def TI(n):return GI(n,n-1)
def accum(ls):
    rt=[0]
    for i in ls:rt+=[rt[-1]+i]
    return rt
def bit_combination(n,base=2):
    rt=[]
    for tb in R(base**n):s=[tb//(base**bt)%base for bt in R(n)];rt+=[s]
    return rt
def gcd(x,y):
    if y==0:return x
    if x%y==0:return y
    while x%y!=0:x,y=y,x%y
    return y
def YN(x):print(['NO','YES'][x])
def Yn(x):print(['No','Yes'][x])
def show(*inp,end='\n'):
    if show_flg:print(*inp,end=end)

mo=10**9+7
inf=float('inf')
FourNb=[(-1,0),(1,0),(0,1),(0,-1)];EightNb=[(-1,0),(1,0),(0,1),(0,-1),(1,1),(-1,-1),(1,-1),(-1,1)];compas=dict(zip('WENS',FourNb));cursol=dict(zip('LRUD',FourNb))
l_alp=string.ascii_lowercase
#sys.setrecursionlimit(10**7)
read=sys.stdin.buffer.read;readline=sys.stdin.buffer.readline;input=lambda:sys.stdin.readline().rstrip()

########################################################################################################################################################################

show_flg=False
show_flg=True

ans=0

n=I()

ans=10-n//200
print(ans)


# Optimized solution
print((10-int(eval(input()))//200))
# Original solution
import sys, math, itertools, collections, bisect 
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1

x = int(eval(input()))
if x < 600:
    print((8))
elif x < 800:
    print((7))
elif x < 1000:
    print((6))
elif x < 1200:
    print((5))
elif x < 1400:
    print((4))
elif x < 1600:
    print((3))
elif x < 1800:
    print((2))
else:
    print((1))

# Optimized solution
x = int(eval(input()))
print((10 - x//200))
# Original solution
X=int(eval(input()))

if 400<=X<=599:
    print((8))
    exit()
if 600<=X<=799:
    print((7))
    exit()
if 800<=X<=999:
    print((6))
    exit()
if 1000<=X<=1199:
    print((5))
    exit()
if 1200<=X<=1399:
    print((4))
    exit()
if 1400<=X<=1599:
    print((3))
    exit()
if 1600<=X<=1799:
    print((2))
    exit()
if 1800<=X<=1999:
    print((1))
    exit()


# Optimized solution
X=int(eval(input()))

kyu= 10 - X//200

print(kyu)
# Original solution
rate = int(eval(input()))
k = '1'
if (400 <= rate < 600):
    k = '8'
elif (600 <= rate < 800):
    k = '7'
elif (800 <= rate < 1000):
    k = '6'
elif (1000 <= rate < 1200):
    k = '5'
elif (1200 <= rate < 1400):
    k = '4'
elif (1400 <= rate < 1600):
    k = '3'
elif (1600 <= rate < 1800):
    k = '2'
elif (1800 <= rate < 2000):
    k = '1'
print(k)


# Optimized solution
def resolve():
    rate = int(eval(input()))
    if rate < 600:
        print('8')
    elif rate < 800:
        print('7')
    elif rate < 1000:
        print('6')
    elif rate < 1200:
        print('5')
    elif rate < 1400:
        print('4')
    elif rate < 1600:
        print('3')
    elif rate < 1800:
        print('2')
    else:
        print('1')

if __name__ == "__main__":
    resolve()
# Original solution
# import sys
import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
    # combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    x = int(eval(input()))
    ans = 0
    if x<600:
        ans = 8
    elif x<800:
        ans = 7
    elif x<1000:
        ans = 6
    elif x<1200:
        ans = 5
    elif x<1400:
        ans = 4
    elif x<1600:
        ans = 3
    elif x<1800:
        ans = 2
    else:
        ans = 1
    print(ans)
    return

if __name__=='__main__':
    main()


# Optimized solution
x = int(eval(input()))
if x<600:
    print((8))
elif x<800:
    print((7))
elif x<1000:
    print((6))
elif x<1200:
    print((5))
elif x<1400:
    print((4))
elif x<1600:
    print((3))
elif x<1800:
    print((2))
else:
    print((1))
# Original solution
X = int(eval(input()))

if 1800 <= X <=1999:
    print((1))
elif 1600 <= X <=1799:
    print((2))
elif 1400 <= X <=1599:
    print((3))
elif 1200 <= X <=1399:
    print((4))
elif 1000 <= X <=1199:
    print((5))
elif 800 <= X <=999:
    print((6))
elif 600 <= X <=799:
    print((7))
else:
    print((8))

# Optimized solution
X = int(eval(input()))
print((10 - X//200))
# Original solution
x = int(eval(input()))
ans = 8
max = 599
min = 400
while True:
  if min <= x < max:
    print(ans)
    break
  else:
    max += 200
    min += 200
    ans -= 1

# Optimized solution
x = int(eval(input()))
ans = 8
max = 599
min = 400
while True:
  if min <= x <= max:
    print(ans)
    break
  else:
    max += 200
    min += 200
    ans -= 1
# Original solution
print(((2199-int(eval(input())))//200))

# Optimized solution
import sys
readline = sys.stdin.readline

X = int(readline())

limit = 600
rank = 8
for i in range(8):
  if X < limit:
    print(rank)
    break
  limit += 200
  rank -= 1
# Original solution
def approve(A: list) -> bool:
    is_even = lambda number: number % 2 is 0
    is_odd = lambda number: not is_even(number)
    is_dividable_by_3 = lambda number: number % 3 is 0
    is_dividable_by_5 = lambda number: number % 5 is 0
    is_dividable_by_3_or_5 = lambda number: is_dividable_by_3(number) or is_dividable_by_5(number)
    is_approved = lambda number: (
        is_odd(number) or
        (is_even(number) and is_dividable_by_3_or_5(number)))

    approved = all([is_approved(Ai) for Ai in A])

    return approved


N = eval(input())
A = list(map(int, input().split()))

answer = 'APPROVED' if approve(A) else 'DENIED'

print(answer)


# Optimized solution
def approve(A: list) -> bool:
    is_even = lambda number: number % 2 is 0
    is_odd = lambda number: not is_even(number)
    is_dividable_by_3 = lambda number: number % 3 is 0
    is_dividable_by_5 = lambda number: number % 5 is 0
    is_dividable_by_3_or_5 = lambda number: is_dividable_by_3(number) or is_dividable_by_5(number)
    is_approved = lambda number: (
        is_odd(number) or
        (is_even(number) and is_dividable_by_3_or_5(number)))

    approved = all(map(is_approved, A))

    return approved


N = eval(input())
A = list(map(int, input().split()))

answer = 'APPROVED' if approve(A) else 'DENIED'

print(answer)
# Original solution
n=int(eval(input()))
List=list(map(int,input().split()))
num=0
cnt=0
for i in List:
    if i%2==0:
        num+=1
        if i%3==0 or i%5==0:
            cnt+=1
if num==cnt:
    print("APPROVED")
else:
    print("DENIED")

# Optimized solution
import sys
n=int(eval(input()))
List=list(map(int,input().split()))
for i in range(len(List)):
    if List[i]%2==0:
        if List[i]%3!=0 and List[i]%5!=0:
            print("DENIED")
            sys.exit()
print("APPROVED")
# Original solution
def main():

    N = int(eval(input()))
    A = list(map(int, input().split()))

    for v in A:
        if v % 2 == 0 and (v %3 != 0 and v % 5 != 0):
            return "DENIED"
    return "APPROVED"

if __name__ == '__main__':
    print((main()))


# Optimized solution
def main():

    N = int(eval(input()))
    A = list(map(int, input().split()))
    for v in A:
        if v % 2 == 0 and (v % 5 != 0 and v % 3 != 0): return "DENIED"
    return "APPROVED"

if __name__ == '__main__':
    print((main()))