The prestigious Codeforces kindergarten consists of n kids, numbered 1 through n. Each of them are given allowance in rubles by their parents.Today, they are going to the most famous candy shop in the town. The shop sells candies in packages: for all i between 1 and m, inclusive, it sells a package containing exactly i candies. A candy costs one ruble, so a package containing x candies costs x rubles.The kids will purchase candies in turns, starting from kid 1. In a single turn, kid i will purchase one candy package. Due to the highly competitive nature of Codeforces kindergarten, during a turn, the number of candies contained in the package purchased by the kid will always be strictly greater than the number of candies contained in the package purchased by the kid in the preceding turn (an exception is in the first turn: the first kid may purchase any package). Then, the turn proceeds to kid i + 1, or to kid 1 if it was kid n's turn. This process can be ended at any time, but at the end of the purchase process, all the kids must have the same number of candy packages. Of course, the amount spent by each kid on the candies cannot exceed their allowance.You work at the candy shop and would like to prepare the candies for the kids. Print the maximum number of candies that can be sold by the candy shop to the kids. If the kids cannot purchase any candy (due to insufficient allowance), print 0.

The first line contains two space-separated integers n and m (2 ≤ n ≤ 2·105, 2 ≤ m ≤ 5·106, n ≤ m), denoting the number of kids and the maximum number of candies in a package sold by the candy shop, respectively. Then n lines follow, each line will contain a single positive integer not exceeding  denoting the allowance of a kid in rubles. The allowances are given in order from kid 1 to kid n. Please, do not use the %lld specificator to read or write 64-bit integers in C++. It is recommended to use cin, cout streams (also you may use %I64d specificator).

Print a single integer denoting the maximum number of candies that can be sold by the candy shop.

NoteFor the first example, one of the scenarios that will result in 13 purchased candies is as follows.   Turn 1. Kid 1 purchases 1 candy.  Turn 2. Kid 2 purchases 3 candies.  Turn 3. Kid 1 purchases 4 candies.  Turn 4. Kid 2 purchases 5 candies.

uses math;
Var ans,n,p,m,res,bp,delta,free,ub,lb,ubef,init:int64;
    a,b:array[0..200333]of int64;
    i,pp:longint;
  begin
    read(n,m);
    for i:=1 to n do
      read(b[i]);
    for pp:=1 to m div n do
      begin
        p:=pp;
        a[n]:=b[n];
        for i:=n-1 downto 1 do
          a[i]:=min(b[i],a[i+1]-p);
        lb:=p*(p-1) div 2*n+p;
        if a[1]<lb then continue;
        ub:=m*p-n*p*(p-1)div 2-(n-1)*p;
        ubef:=m*(p-1)-n*(p-1)*(p-2)div 2-(n-1)*(p-1);
        init:=1;
        bp:=0;
        if a[1]<=ubef+1 then bp:=a[1]
        else begin
               init:=a[1]-ubef;
               if a[1]>ub then
                 begin
                   init:=m-n*p+1;
                   bp:=ub;
                 end
                else bp:=a[1]
             end;
        free:=m-n*p-init+1;
        res:=bp;
        for i:=2 to n do
          begin
            bp:=bp+p;
            delta:=min(a[i]-bp,free);
            free:=free-delta;
            bp:=bp+delta;
            res:=res+bp;
          end;
        ans:=max(ans,res);
      end;
    Writeln(ans);
  end.

uses math;
Var ans,n,p,m,res,bp,delta,free,ub,lb,ubef,init:int64;
    a,b:array[0..200333]of int64;
    i,pp:longint;
  begin
    read(n,m);
    for i:=1 to n do
      read(b[i]);
    for pp:=1 to m div n do
      begin
        p:=pp;
        a[n]:=b[n];
        for i:=n-1 downto 1 do
          a[i]:=min(b[i],a[i+1]-p);
        lb:=p*(p-1) div 2*n+p;
        if a[1]<lb then break;
        ub:=m*p-n*p*(p-1)div 2-(n-1)*p;
        ubef:=m*(p-1)-n*(p-1)*(p-2)div 2-(n-1)*(p-1);
        init:=1;
        bp:=0;
        if a[1]<=ubef+1 then bp:=a[1]
        else begin
               init:=a[1]-ubef;
               if a[1]>ub then
                 begin
                   init:=m-n*p+1;
                   bp:=ub;
                 end
                else bp:=a[1]
             end;
        free:=m-n*p-init+1;
        res:=bp;
        for i:=2 to n do
          begin
            bp:=bp+p;
            delta:=min(a[i]-bp,free);
            free:=free-delta;
            bp:=bp+delta;
            res:=res+bp;
          end;
        ans:=max(ans,res);
      end;
    Writeln(ans);
  end.


When preparing a tournament, Codeforces coordinators try treir best to make the first problem as easy as possible. This time the coordinator had chosen some problem and asked $$$n$$$ people about their opinions. Each person answered whether this problem is easy or hard.If at least one of these $$$n$$$ people has answered that the problem is hard, the coordinator decides to change the problem. For the given responses, check if the problem is easy enough.

The first line contains a single integer $$$n$$$ ($$$1 \le n \le 100$$$) — the number of people who were asked to give their opinions. The second line contains $$$n$$$ integers, each integer is either $$$0$$$ or $$$1$$$. If $$$i$$$-th integer is $$$0$$$, then $$$i$$$-th person thinks that the problem is easy; if it is $$$1$$$, then $$$i$$$-th person thinks that the problem is hard.

Print one word: "EASY" if the problem is easy according to all responses, or "HARD" if there is at least one person who thinks the problem is hard.  You may print every letter in any register: "EASY", "easy", "EaSY" and "eAsY" all will be processed correctly.

NoteIn the first example the third person says it's a hard problem, so it should be replaced.In the second example the problem easy for the only person, so it doesn't have to be replaced.

program abc;
var k,i,n:integer; f:boolean;
Begin
f:=true;
readLn(k);
for i:= 1 to k do
Begin
read(n);
if n = 1 then
Begin
f:=false;
break;
End;
End;
if f then writeLn('EASY')
else writeLn('HARD');
End.

Program A;
Var n,i,b,C:integer;
Begin
  Readln(n);
  C:=0;
  for i:=1 to n do begin
    read(b);
    if b=1 then c:=1;
    end;
  if c=1 then writeln('HARD')
  else writeln('EASY');
end.

var n, i, q:integer;
f:boolean;
begin
readln (n);
f:=true;
for q:=1 to n do begin
read (i);
if (i=1) then
f:=false;
end;
if (f=false) then writeln ('Hard')
else writeln ('Easy');
end.

program N2;
var
        n, i: LongInt;
        a: array [1..100] of Integer;

begin
        ReadLn (n);

        for i := 1 to n do
                Read (a[i]);
        ReadLn;

        for i := 1 to n do
                if a[i] = 1 then
                begin
                        WriteLn ('HARD');
                        Exit
                end;

        WriteLn ('EASY')
end.

var C,I,A,n:integer;
begin
 readln(n);
 c:=0;
 FOR i:=1 to n do
  begin
   read(a);
   C:=c+a;
  end;
  if c<>0 then
  writeln('hard')
  else
  writeln('eASY');
end.

var
  n,i,x:longint;
begin
  readln(n);
  for i:=1 to n do
    begin
      read(x);
      if x=1 then
        begin
          writeln('HARD');
          halt;
        end;
    end;
  writeln('EASY');
end.

Program jhdgfjqhwgbfjqevgbk;
var s,i,n,a:integer;
begin
readln(n);
s:=0;
for i:=1 to n do
  begin
  read(a);
  s:=s+a;
  end;
if s=0 then writeln('EASY')
       else writeln('HARD');
end.

var
  i, n, x, f: integer;
Begin

  readln(n);
  for i:= 1 to n do
  begin
    read(x);
    if (x = 1) then
      f:= 1;
  end;

  if (f = 1) then
    writeln('HARD')
  else
    writeln('EASY');
End.

var  n,i:longint;
     a:array[1..100] of longint;
BEGIN
readln(n);
for i:=1 to n do
 read(a[i]);

for i:=1 to n do
 begin
 if a[i]=1 then begin writeln('HARD');exit;end
 end;
writeln('EASY');

END.

var a,i,b:integer;
begin
  read(a);
  b:=0;
  i:=1;
  while (i <= a) and (b=0) do
  begin
    i:=i+1;
    read(b);
  end;
  if b=0 then
    write('EASY')
  else
    write('HARD');
end.

var
otv:array[1..100] of byte;
i,j,k,flag:byte;
ez,hr:string;
begin
ez:='Easy';
hr:='Hard';
readln(k);
for i:=1 to k do
read(otv[i]);
flag:=0;
for j:=1 to k do
begin
if otv[j]=1 then begin
writeln(hr);
flag:=0;
break;
end;
if ((otv[j]=0) and (flag<>1)) then
flag:=1;
end;
If (flag=1) then writeln(ez);
end.

Var a:array[1..1000] of Longint;
    N,i,dem:Longint;
Begin
    Readln(N);
    For i:=1 to N do read(a[i]);
    For i:=1 to N do
        If a[i]=1 then inc(dem);
    If dem=0 then writeln('EASY');
    If dem>0 then writeln('HARD');
End.

var
  flag:boolean;
  n,a:integer;

begin
  flag:=true;

  readln(n);

  for var i:=1 to n do
  begin
    read(a);
    if (a=1) then flag:=false;
  end;

  if flag then writeln('EASY') else writeln('HARD');

end.

var n,a:integer;
begin
read(n);
for var i:=1 to n do
begin
    read(a);
    if (a=1) then
    begin
        write('HARD');
        break;
    end
    else if (i=n) then write('EASY');
end;
end.

var s,i,n:integer;
    a:array[1..100]of integer;
begin
 readln(n);
 for i:=1 to n do
  read(a[i]);

 s:=0;
 for i:=1 to n do
  s:=s+a[i];

 if(s>0)
 then write('HARD')
 else write('EASY');
end.

var
n, b, i, a:integer;
begin
    readln(n);

    for i:= 1 to n do
    begin
        read(b);
        if b = 1 then
        begin
            a:= a+1;
        end
    end;
    if a >= 1 then
    begin
        writeln('HARD');
    end
    else
    begin
        writeln('EASY')
    end;
end.

var
n,x,i,c:longint;
begin
readln(n);
for i:=1 to n do
 begin
read(x);
if x=1 then c:=1;
end;
if c=0 then writeln('EASY')
else
writeln('HARD');
end.

var n,m,p,r,a,x,y,max,s,min,albe,negre,c : longint;
b,v : array[0..100000] of longint;
da : boolean;
z : ansistring;
begin

	readln(n);

	da:=true;
	for c:=1 to n do
	begin
		read(a);

		if a=1 then
		da:=false;
	end;

	if da=true then writeln('easy') else
	writeln('hard');

end.

var i,n:longint;
    a:array[1..100000] of longint;
begin
    readln(n);
    for i:=1 to n do
    begin
        read(a[i]);
        if a[i]=1 then
        begin
            write('HARD');
            halt;
        end;
    end;
    write('EASY');
end.

var n,i,t:longint;
cc:boolean;
begin
readln(n);
cc:=false;
for i:=1 to n do
begin
read(t);
if t=1 then cc:=true;
end;
if cc=false then writeln('EASY')
else writeln('HARD');
readln;
end.

var
  N, i, num, chet: longint;

begin
  read(N);
  for i := 1 to N do
  begin
    read(num);
    if(num = 1) then
      chet := 1;
  end;
  if(chet = 1) then
    write('HARD')
  else
    write('EASY');
end.

var i,n,z:integer;
begin
     readln(n);
     for i:=1 to n do
     begin
          read(z);
          if z = 1 then
          begin
             write('HARD');
             exit;
          end;
     end;
     write('EASY');
end.

var
 n,i,x:integer;
begin
  readln(N);

  for i:=1 to N do
  begin
    read(x);
    if (x=1) then
      break;
  end;
  if (x=1) then
     writeln('Hard')
  else
    writeln('Easy');
 end.

var i, w:integer;
s:string;
q: array[1..100] of integer;
begin
w:=0;
read(i);
for i:=1 to i do
begin
read(q[i]);
if q[i]=1 then inc(w);
end;
if w>=1 then write('hard') else write('easy');
end.

Program test_prog_1;
var k, b, n, i :integer;
begin
read (n);
for i:= 1 to n do
begin
read (b);
if b=1 then k:= k+1;
end;
if k<>0 then write ('hard')
else write ('easy');
end.

var i,kol,n:integer;
a:array [1..100] of integer;
begin
readln(n);
for i:=1 to n do
  read(a[i]);
kol:=0;
for i:=1 to n do begin
  if a[i] = 1 then
    kol:=kol+1;
end;
if kol>0 then writeln('HARD') else writeln('EASY');
end.

Program abc;
var i,n:integer;
x:array[1..1000000] of integer;
l:boolean;
begin
readln(n);
for i:=1 to n do
read(x[i]);
for i:=1 to n do
if x[i]=1 then l:=true;

if l then writeln('HARD') else writeln('EASY');
end.

program zB;
var n,i,o,sl:integer;
begin
readln (n);
for i:=1 to n do
begin
read (o);
if o=1 then sl:=1
end;
if sl=1 then writeln('hard')
else writeln('easy')
end.

var a:array[1..100] of byte;
n,i:byte;
b:boolean;
begin
 b:=true;
 read(n);
 for i:=1to n do read(a[i]);
 for i:=1to n do if a[i]=1 then b:=false;
 if b then write('EASY') else writeln('HARD');
readln();
end.

var ans, a, n, i:longint;
begin
read(n);
for i:=1 to n do
   begin
   read(a);
   inc(ans,a);
   end;
if ans>0 then write('hard') else write('easy');
end.

var i,n,m,count:Integer;
begin
read(n);
count:=0;
for i:= 1 to n do
begin
read(m);
if m=1
then
inc(count);
end;
if count>0
then write('hard')
else
write('easy');
end.

var
 n,i,m,sum:integer;
begin
 readln(n);
 sum:=0;
for i:=1 to n do
 begin
  read(m);
  sum:=sum+m;
 end;
if sum>0 then
 writeln('Hard')
else
 writeln('Easy');
end.

var i,n,a:integer;
begin
  readln(n);
  while (n>0) and (a=0) do
  begin
  read(a);
  if a=1 then
  writeln('HARD');
  n:=n-1;
  end;
  if (n=0) and (a=0) then
  writeln('EASY');
end.

const Sz = 100;
var
a: array [1..Sz] of integer;
  N,s,i: integer;
begin
read(n);
 for i:=1 to n do begin
                 read(a[i]);
                 if a[i] = 1 then s:= s + 1;
                  end;
if s>0 then writeln('HARD') else writeln('easy');
end.

 program adsaw;

var m,n,i :integer;
    list :array[1..100] of integer;

begin

readln(n);
m := 0;
for i := 1 to n do
  read(list[i]);

for i := 1 to n do
  m := list[i] + m;

if m = 0 then writeln('EASY')
  else writeln('HARD');

end.

const
        fin='AIN.inp';fon='AIN.out';
var n,i,j,k,l:longint;
    a:array[1..10000000]of longint;
begin
//assign(input,fin);
//reset(input);
//assign(output,fon);
//rewrite(output);
readln(n);
for i:=1 to n do
        begin
        read(k);
        if k=1 then
                begin
                writeln('HARD');
                l:=1;
                break;
                end;
        end;
if l<>1 then writeln('EASY');
//close(input);close(output);
end.

var  n,i,k:longint;
begin
readln(n);
for i:=1 to n do
begin
read(k);
if k=1 then begin write('HARD');exit;end;
end;
write('EASY');
end.

var
n,a,i,e:integer;

Begin

read(n);

e:=9;

for i:=1 to n do
begin
read(a);

if (a = 1) then e:=10;

end;

if (e = 9) then write('EASY')
			else write('HARD');

End.

program NIKTOP2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var n,z,c:int64;
i:integer;
a:array [1..1000] of integer;

begin
read(n);
for i:=1 to n do begin
read(c);
if c=0 then
inc(z)
else begin
write('HARD');
halt(0);
end;
end;
write('EASY');
end.

var
  n, i, j: integer;

begin
  read(n);
  for i := 1 to n do
  begin
    read(j);
    if j = 1 then
    begin
      write('HARD');
      exit;
    end;
  end;
  write('EASY');
end.

var n,i,a: integer;
s: boolean;
begin
  readln (n);
  for i:= 1 to n do
  begin
    read (a);
    if a=1 then
    begin
      s := false;
      break;
    end
            else s:= true;
  end;
  if s = false then writeln ('HARD')
              else writeln ('EASY');
end.

var
    i,j,n,m:integer;
begin
    read(n);
    for i:=1 to n do
    begin
    read(m);
    j:=j+m;
    end;
    if j>=1 then writeln('HARD') else writeln('EASY');
end.

var n,i,g,r,a:integer;
begin
readln (n);
for g:=1 to n do
begin
read (i);
if i>0 then a:=1
else a:=0;
r:=r+a;
end;
if r>0 then write ('HARD') else write ('EASY')
end.

var a,b,c,i,n:Integer;
 r: string;
begin
r:='easy';
readln(n);
for i:=1 to n do begin
 read(a);
  if a = 1 then
   r:= 'hard';
  end;
writeln(r);
end.

var a:array[1..100] of integer;
i,n,j,k:integer;
begin
readln(n);
for i:=1 to n do
read(a[i]);
k:=0;
for i:=1 to n do
if a[i]<>0 then inc(k);
if k>0 then writeln('HARD') else writeln('EASY');
end.

var n,i,f,j,k :integer;
begin
read(n);
f := 0;
for j:=1 to n do
begin
read(i);
if i = 1 then
f := f + 1
else
k:=0;
end;
if f > 0 then
write('HARD')
else
write('EASY')
end.

program z_a;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
    n, i, x: integer;
begin
    readln(n);
    for i := 1 to n do
    begin
        read(x);
        if (x = 1) then
        begin
            writeln('HARD');
            exit;
        end;
    end;
    writeln('EASY');
    readln;
end.

var
 n,i,x:integer;
begin
  readln(N);

  for i:=1 to N do
  begin
    read(x);
    if (x=1) then
      break;
  end;
  if (x=1) then
     writeln('Hard')
  else
    writeln('Easy');
 end.

var n,z,i:integer;
    k: array[1..101] of byte;

 begin
   readln(n);
   z:=0;
   for i:=1 to n do
      begin
       read(k[i]);
       if k[i]=1 then
        z:=z+1;
      end;
      if z>0
      then writeln('HARD')
      else writeln('EASY');
 end.

var n, i, q: integer;
begin
    read(n);
    for i:=1 to n do begin
        read(q);
        if q = 1 then begin write('HARD'); exit; end;
        end;
    write('EASY');
end.

var a,k,n,p:integer;
begin
readln(n);
for a:=1 to n do
begin;
read(p);
if p=1 then k:=k+1;
end;

if k>0 then writeln('hard') else writeln('easy');
readln;
end.

var
  k, n, i, x, code: longint;
  a: string;
begin
k := 0;
readln(n);
readln(a);
a := a + ' ';
for i := 1 to n do begin
val(copy(a, 1, 1), x, code);
if x = 1 then
inc(k);
delete(a, 1, pos(' ', a));
end;
if k > 0 then writeln('HARD')
else
writeln('EASY');
end.

program Gay;
var n, a : Integer;
begin
Read(n, a);
for n := n downto 1 do
begin
if a = 1 then
a := 1
else Read(a);
end;
if a <> 1 then
Write('EASY')
else Write('HARD');
end.

var i,n,p:longint;
ic:boolean;
begin
readln(n);
ic:=true;
for i:=1 to n do
begin
read(p);
if p=1 then ic:=false;
end;
if ic=true then writeln('EASY') else writeln('HARD');
end.

var  i,n,k: integer;
     a: array [1..101] of integer;
  begin
   readln(n);
   k:=0;
   for i:=1 to n do
    begin
    read(a[i]);
    if a[i] = 1 then k:=k+1;
    end;
 if k=0 then writeln('EASY')
  else writeln('HARD');
 end.

var n,a,sum:integer;
begin
    read(n);
    sum:=0;
    for var i:=1 to n do
    begin
        read(a);
        sum:=sum+a;
    end;
    if (sum>0) then
    begin
        write('HARD');
    end
    else
    begin
        write('EASY');
    end;
end.

type mas = array[1..100] of longint;
var
    n, i: longint;
    chel: mas;
    ch: boolean;
begin
    read(n);
    ch:=True;
    for i:=1 to n do begin
        read(chel[i]);
        if chel[i]=1 then
            ch:=False;
    end;
    if ch then
        write('EASY')
    else
        write('HARD');
end.

program yok;
var
	cek:boolean;
	n,k,i:integer;
begin
	readln(n);
	cek:=true;
	for i:=1 to n do
	begin
		read(k);
		if (k=1) then
		cek:=false;
	end;
	if cek=false then
	writeln('HARD')
	else
	writeln('EASY');
end.

var n,i:integer;
    a:array[1..100] of integer;
    s:string;
begin
readln(n);
s:='easy';
for i:=1 to n do read(a[i]);
for i:=1 to n do
if a[i] = 1 then
s:='Hard';
writeln(s);
end.

const max=100;
var n,i:longint;
    a:array[1..max] of longint;
begin
        readln(n);
        for i:=1 to n do read(a[i]);
        for i:=1 to n do
        begin
            if a[i]=1 then
            begin
                write('HARD');
                readln;
                halt;
             end;
        end;
        write('EASY');
        readln;
end.

var a: array [1..100] of integer;
n: integer;
i: integer;
c: integer;
begin
c:=0;
readln(n);
for i:=1 to n do
read(a[i]);
for i:=1 to n do
if a[i]=1 then
begin
writeln('HARD');
break;
end
else
c:=c+1;
if c=n then
writeln('EASY');
end.

var
  n,i,x:longint;
  ok:boolean;
begin
  readln(n);
  ok:=true;
  for i:=1 to n do
  begin
    read(x);
    if x=1 then ok:=false;
  end;
  if ok then writeln('EASY')
        else writeln('HARD');
end.

Var n , i , k : Byte;
Begin
Readln(n);
i := 1;
While i <= n do
    Begin
    Read(k);
    If k = 1 then Break else Inc(i);
    End;
If k = 1 then Writeln('HARD') else Writeln('EASY');
End.

var n,i,g,m:integer;
begin
read(n);
m:=0;
for i:=1 to n do begin
read(g);
if g=1 then m:=m+g;
end;
if m>0 then write('HARD') else write('EASY');
end.

program main;
var
    hard : boolean;
    i, n : integer;
    a : array[1..100] of integer;
begin
    readln(n);
    for i := 1 to n do read(a[i]);
    for i := 1 to n do begin
        if a[i] = 1
            then hard := true;
    end;
    if hard = true
        then writeln('Hard')
    else writeln('Easy');
end.

program easy;
var i, n, a: integer;
begin
    readln(n);
    for i := 1 to n do begin
        read(a);
        if a = 1 then begin
            writeln('HARD');
            exit();
        end;
    end;
    writeln('EASY');
end.

var a,b,i,n: integer;
begin
    read (n);
    b := 0;
    for i:=1 to n do begin
        read (a);
        b := b or a;
    end;
    if (b = 1) then write ('HARD') else write ('EASY');
end.

VAR A,F,I:INT64;
B: ARRAY [1..100000] OF BYTE;
BEGIN
F:=0;
READ(A);
FOR I:=1 TO A DO BEGIN
READ (B[I]);
IF B[I]=1 THEN F:=1;
END;
IF F=1 THEN WRITE('HARD') ELSE WRITE('EASY');
END.

var
     n,i: integer;
     a: array[1..999] of integer;
begin
read(n);
for i:=1 to n do
    read(a[i]);
for i:=1 to n do
    if a[i]=1 then begin
       write('HARD');
       exit; end;
    write('EASY');
    end.

var
        n,i,x:longint;
begin
        readln(n);
        for i:=1 to n do
        begin
                read(x);
                if x=1 then
                begin
                        writeln('HARD');
                        exit;
                end;
        end;
        writeln('EASY');
end.

var t,x,a,b:integer;
begin
read (a);
t:=0;
for x:=1 to a do
  begin
  read(b);
  if b=1 then t:=1;
  end;
if t=0 then print ('Easy') else print ('Hard');
end.

var
n,i,j:integer;
a:array[0..1]of integer;
begin
readln(n);
for i:=1 to n do
begin
read(j);
a[j]:=a[j]+1;
end;
if a[0]=n then write('easy')else write('hard');
end.

program z6;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  n, i, k: integer;
  b: boolean;

begin
  readln(n);
  for i:= 1 to n do begin
    read(k);
    if (k = 1) then
      b := true;
  end;
  if (b) then
    writeln('HARD')
  else
    writeln('EASY');
  readln;
end.

var n,i,k:integer;
a:array[1..100] of integer;
begin
readln(n);
k:=0;
for i:=1 to n do begin read(a[i]);end;
for i:=1 to n do begin
if a[i]=1 then k:=1;
end;
if k=1 then writeln('HARD') else writeln('EASY');
end.

var n,i,f,j,k :integer;
begin
read(n);
f := 0;
for j:=1 to n do
begin
read(i);
if i = 1 then
f := f + 1
else
k:=0;
end;
if f > 0 then
write('HARD')
else
write('EASY')
end.

var  n,i,k:longint;
begin
readln(n);
for i:=1 to n do
begin
read(k);
if k=1 then begin write('HARD');exit;end;
end;
write('EASY');
end.

Program z1;
Var
 n,i,k:integer;
 y:string;
begin
y:='EASY';
Readln(n);
For i:=1 to n do begin
Read(k);
If k=1 then y:='HARD';
k:=0;
end;
Writeln(y)
end.

var n, i, q: integer;
begin
    read(n);
    for i:=1 to n do begin
        read(q);
        if q = 1 then begin write('HARD'); exit; end;
        end;
    write('EASY');
end.

program rus;

{$APPTYPE CONSOLE}
{$o-}
uses
  SysUtils;
var a:array[1..100000]of LongInt;
//b:array[-100000..100000]of longint;
b,sum,j,a1,t,p,a2,b1,b2,c1,c2,max,min,i,o,n,k:longint;

begin

read(n);
for i:=1 to n do begin
  read(k);
  if k=1 then begin
    write('HARD');
    Halt(0);
  end;
end;
write('eAsY');
end.

var
n,a,i,e:integer;

Begin

read(n);

e:=9;

for i:=1 to n do
begin
read(a);

if (a = 1) then e:=10;

end;

if (e = 9) then write('EASY')
			else write('HARD');

End.

var n, i, s: integer;
a: array [1..100] of integer;
begin
read(n);
for i:= 1 to n do
read(A[i]);
for i:= 1 to n do
s:=s+A[i];
if s>0 then
write('Hard')
else
write('Easy')
end.

var i,n,z:integer;
begin
     readln(n);
     for i:=1 to n do
     begin
          read(z);
          if z = 1 then
          begin
             write('HARD');
             exit;
          end;
     end;
     write('EASY');
end.

var
  n,i,c:longint;
  a: array[1..102] of longint;
begin
  read(n); c:=0;
  for i:= 1 to n do
    read(a[i]);
  for i:= 1 to n do
   if a[i]>0 then
    c:=1;
  if c=0 then
    write('EASY')
   else
     write('HARD')
end.

var a, b, c, i: integer;
begin
read(a);
b:=0;
for i:=1 to a do begin
    read(c);
    if c = 1 then b:=b+1;
    end;
if b = 0 then writeln('easy')
else writeln('hard');
end.

var i,k,n:integer;a:array[1..100] of integer;
begin
  read(n);
  for i:=1 to n do
  begin
    read(a[i]);
    if a[i]=0 then
      inc(k);

      end;
      if k=n then writeln('EASY') else writeln('HARD');
end.

var n,i,g,r,a:integer;
begin
readln (n);
for g:=1 to n do
begin
read (i);
if i>0 then a:=1
else a:=0;
r:=r+a;
end;
if r>0 then write ('HARD') else write ('EASY')
end.

begin
  var n := ReadlnInteger;
  var a := ReadString.ToIntegers;
  if a.Any(x -> x = 1) then
    Write('HARD')
  else Write('EASY')
end.

var n, i, k, m: integer;
s: string;
begin
readln (n);
k:=0;
for i:=1 to n do
  begin
  read (k);
  m:= m+k;
  end;
    if m > 0then
    write ('HARD')
    else  write ('easy');

end.

var
 x,i,n:longint;
 p:boolean;
begin
 readln(n);
 for i:=1 to n do
  begin
   read(x);
   if x=1 then p:=true;
  end;
 if p then write('HARD')
 else write('EASY');
end.

program S1;
var a:array[1..1000000] of integer;
i,n,k:integer;
begin
readln(n);
for i:=1 to n do
read(a[i]);
for i:=1 to n do
if a[i]=1 then k:=k+1;
if k>0 then
writeln('hard')
else writeln('easy');
end.

Program A;
Var n,i,b,C:integer;
Begin
  repeat
  Readln(n);
  Writeln('Неверные входные данные. Повторите попытку');
  until (n>0) and (n<100);
  C:=0;
  for i:=1 to n do begin
    read(b);
    if b=1 then c:=1 else if (b<>0) and (b<>1) then c:=2;
    end;
  if c=1 then writeln('HARD')
  else if c=2 then writeln('Неверные входные данные')
  else writeln('EASY');
end.

var
i, n, a:integer;
begin
read(n);
for i:=1 to n do
read(a);
if a=1 then write('hard')
else write('eaze');
end.

program loc;
type sir=array [1..100] of integer;
var n,i,k:integer;
    s:sir;
    b:boolean;
begin
readln(n);
for i:=1 to n do
readln(s[i]);
for i:=1 to n do
if s[i]=1 then b:=true;
if b=true then writeln('HARD') else writeln('EASY');
end.

var n,i,f,j :integer;
begin
read(n);
for j:=1 to n do
begin
read(i);
if i = 0 then
f := 0
else
f := 1;
end;
if f = 1 then
write('HARD')
else
write('EASY')
end.

{$A8,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O-,P+,Q-,R+,S+,T-,U-,V+,W-,X+,Y+,Z1}
{$MINSTACKSIZE $00004000}
{$MAXSTACKSIZE $00100000}
{$IMAGEBASE $00400000}
{$APPTYPE CONSOLE}

const filename='qc';
      oo=maxlongint div 2;
      eps=1e-6;
      eee=1e-21;

var qq,cc,a,aa:array[0..1000000]of longint;
    qc,he:array[0..2014,0..2014]of longint;
    ss,sss:array[0..10000]of string;
    s,s0,s1,s2,s3:string;
    x,y,z,xx,yy,zz,x0,y0,z0,x1,x2,x3,y1,y2,y3,z1,z2,z3:extended;
    res64,n64,nn64:int64;
    w,nt,ii,jj,n,m,q,c,q0,c0,q1,c1,q2,c2,q3,c3:longint;
    nn,mm,kk,u,v,res,cur,max,min:longint;
    test,ll,t,tt:longint;
    b,bb,bbb,b0,b1,b2,b3:boolean;
    ccc:char;

function mx(q,c:longint):longint;
  begin
  if q>c then mx:=q else mx:=c;
  end;

function mn(q,c:longint):longint;
  begin
  if q<c then mn:=q else mn:=c;
  end;

procedure init;
  begin
  assign(input,filename+'.in');
  assign(output,filename+'.out');
  reset(input);
  rewrite(output);
  end;

procedure fin;
  begin
  close(input);
  close(output);
  end;

procedure clear;
var i,j,k:longint;
  begin
  fillchar(qc,sizeof(qc),0);
  end;

procedure load;
var i,j,k:longint;
  begin
  end;

procedure save;
var i,j,k:longint;
  begin
  end;

procedure swap(var q,c:longint);
var i:longint;
    begin
    i:=q; q:=c; c:=i;
    end;

procedure run;
var i,j,k:longint;
  begin
  //init;
  readln(n);
  for i:=1 to n do
    begin
    read(k);
    if k>1 then begin writeln('HARD'); halt; end;
    end;
  writeln('EASY');
  end;

begin
nt:=1;
//readln(nt);
for test:=1 to nt do
  begin
  clear;
  load;
  run;
  save;
  end;
end.

var a, b, i: integer;
begin
read(a);
b:=0;
for i:=1 to a do
    if a = 1 then b:=b+1;
if a = 0 then writeln('easy')
else writeln('hard');
end.

var n,i,b:integer;
begin
read(n);
b:=0;
for i:=1 to n do begin
                 read(n);
                 if i=0 then b:=b+1;
                                  end;
if b=n then write('EASY') else write('HARD');
end.

var a,b:integer;
begin
read(a);
for a:=1 to a do
read(b);
if b=1 then writeln('HARD') else  writeln('EASY');
 end.

var
n, s, i, l: integer;
begin
READLN(n);
s := 1;
for i := 1 to n do
    begin
    READ(l);
    if (i = 1) then
        s := s + 1;
    end;
if (s = 0) then
    WRITELN('EASY')
else
    WRITELN('HARD');
end.

var c:char;
begin
  readln;
  while not eof do
  begin
    read(c);
    if c='0' then
      continue;
    writeln('HARD');
    halt;
  end;
  writeln('EASY');
end.

var i,n,m,count:Integer;
begin
read(n);
begin
for i:= 1 to n do
read(m);
if m=1
then
inc(count);
end;
if count>0
then write('hard')
else
write('easy');
end.

var n,i,t:longint;
cc:boolean;
begin
readln(n);
cc:=false;
for i:=1 to n do
begin
read(t);
if t=1 then begin writeln('HARD'); cc:=true; end;
end;
if cc=false then writeln('EASY');
readln;
end.

var i,n,m,count:Integer;
begin
read(n);
begin
for i:= 1 to n do
read(m);
if m=1
then
begin
inc(count);
write('hard');
HALT;
end;
 write('easy');
 end;
end.

var n,k, i,m:integer;
begin
readln(n);
for i:=1 to n  do
begin
readln(m);
if m=1 then k:=1;
end;
if k=1 then writeln('EASY') else writeln('HARD');
end.

program ff;
var a,b:integer;
begin
read(a);
for a:=1 to a do
read(b);
if b=1 then writeln('HARD') else  writeln('EASY');
 end.

var n,k, i,m:integer;
begin
readln(n);
for i:=1 to n  do
begin
readln(m);
if m=1 then k:=1;
end;
if k=1 then write('HARD') else write('EASY');
end.

var a,b,c,d,i,n:integer;
begin
readln(n);
if (n<=100) and (n>=1) then
  for c:=1 to n do begin
  if (i=0) or (i=1) then
    read(i);
    a:=a+i;
  end;
  if a>=1
          then writeln ('hard')
          else

          writeln ('easy',a);
end.

var
  n: shortint;
  f: integer;

begin
  readln(n);
  readln(f);
  if (f > 0) then
    writeln('HARD')
  else
    writeln('EASY');
end.

var
    a: array [1..100] of integer;
    i, n, k: integer;

begin
    for i := 1 to n do
        read(a[i]);
    k := 0;
    for i := 1 to n do
        if a[i] = 1 then inc(k);
    if k = 0 then writeln('easy')
    else writeln('hard');
end.

var n,k, i,m:integer;
begin
readln(n);
for i:=1 to n  do
begin
readln(m);
if m=1 then k:=1;
end;
if k=1 then writeln('HARD') else writeln('EASY');
end.

var i,n,m,count:Integer;
begin
read(n);
if n>=1
then
begin
for i:= 1 to n do
read(m);
if m=1
then
begin
inc(count);
write('hard');
exit;
end;
if count=0
then write('easy');
end;
end.

var a,i,n,x:integer;

begin
readln (n);
for x:= 1 to n do
begin
    read (i);
    a:= a+1;
    end;
if a <> 0 then
    writeln ('HARD')
    else
    writeln ('EASY');
end.

var
a:array[1..100] of integer;
i,n,s:integer;
begin
readln(n);
for i:=1 to n do read(a[i]);
for i:=1 to n do s:=s+a[i];
 if s=1 then writeln('HARD') else writeln('EASY');
end.

var a:array[1..100]of integer;
i,n,k:integer;
begin
    readln(n);
    k:=0;
    for i:=1 to n do
    read(a[i]);
    for i:=1 to n do
    if a[i]-1=0 then inc(k);
    if k>0 then writeln('HARD');
    end.

var a:Array[1..100]of integer; flag:boolean; n,i:integer;
begin
readln(n);
for i:=1 to n do read(a[i]);
for i:=1 to n do if a[i]=1 then flag:=True else flag:=False;
if flag=true then writeln('hard') else writeln('easy');
end.

var
  x,i,n:longint;
  blog:boolean;
begin
  readln(n);
  blog:=true;
  for i:=1 to n do
    begin
      read(x);
      if (x=1) then blog:=false;
    end;
  if blog then write('EASY')
          else write('HERD');
end.

var a: array [1..100] of integer;
n: integer;
i: integer;
c: integer;
begin
c:=0;
readln(n);
for i:=1 to n do
read(a[i]);
for i:=1 to n do
if a[i]=1 then
writeln('HARD')
else
c:=c+1;
if c=n then writeln('EASY');
end.

program loc;
var n,i,k:integer;
    b:boolean;
begin
readln(n);
for i:=1 to n do  begin
readln(k);
if k=1 then b:=true;
end;
if b=true then writeln('HARD') else writeln('EASY');
end.

var
a:array[1..1000]of longint;
j,i,p,n:longint;
begin
readln(n);
for i:=1 to n do
read(a[i]);
if a[i]=1 then begin write('HARD');exit;end;
write('EASY');
end.

var n,k,i:integer;
begin
	read(n);
	for i:=1 to n do
	begin
		read(k);
		if k=1 then
			begin
			writeln('HARD');
			exit;
			end;
	end;
	writeln('EAZY');
end.

var a,b,i:integer;
begin
read(a);
i:=1;
for i:=1 to a do begin
read(b);
if b=1 then writeln('HARD') else  writeln('EASY');
end;
 end.

program a1030a;
var q1,a2,i,n,b:integer;
a:array[1..100] of integer;
begin
readln(n);
for i:=1 to n do
begin
read(a[i]);

end;
for i:=1 to n do
begin
if a[i] = 0 then q1:=q1+1;
END;
if q1>0 then writeln ('HARD')
else
writeln ('EASY');
end.

var C,I,A,n:integer;
begin
 readln(n);
 c:=0;
 FOR i:=1 to n do
  begin
   read(a);
   C:=c+a;
  end;
  if c=0 then
  writeln('EASE')
  else
  writeln('HARD');
end.

program q;
  var n,i: integer;
    a,k:string;
begin
  readln(n);
  while (n<0) or (n>100) do begin
  readln(n);
  end;
  readln(k);
  while length(k)-((length(k)-1)/2)<>n do begin
    read(k);
  end;
  for i:=1 to n do begin
    if k[i]='1' then begin
      a:='HARD';
      write(a);
    break;
    end;
  end;
  if a<>'HARD' then write('EASY');
end.

var
i,k, n, a:integer;
begin
read(n);
k:=0;
for i:=1 to n do
begin
read(a);
if a=1 then k:=1;
end;
if k=1 then write('hard')
else write('eazy');
end.

var
otv:array[1..100] of byte;
i,j,k,flag:byte;
ez,hr:string;
begin
ez:='Easy';
hr:='Hard';
readln(k);
for i:=1 to k do
read(otv[i]);
flag:=0;
for j:=1 to k do
begin
if otv[j]=1 then begin
writeln(hr);
break;
end;
if ((otv[j]=0) and (flag<>1)) then
flag:=1;
end;
If flag=1 then writeln(ez);
end.

var
n,a,i,e:integer;

Begin

readln(n);

e:=9;

for i:=1 to n do
begin
readln(a);

if (a = 1) then e:=10;

end;

if (e = 9) then writeln('EASY')
			else writeln('HARD');

End.

Var  y: array[1..1000] of integer;
a,b,n,d,q,i: integer;
begin
readln(n);
for i:=1 to n do
read(y[i]);
for i:=1 to n do
if y[i]=1 then begin   writeln('HARD'); break; end

else  writeln('EASY') ;

end.

var t,n,i,k,x,a,b:integer;
begin

 readln(n);

 for i:=1 to n do begin read(x);  if a=0 then inc(a) else begin writeln('Hard'); break; end;  end;

 if a=n then writeln('Easy');

end.

program Z_1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
    n, i, a, k: integer;

begin
    readln(n);
    k := 0;
    for i := 1 to n do
      read(a);
      if (a = 1) then
          inc(k);
    if (k = 0) then
        writeln('EASY')
    else
        writeln('HARD');
    readln;
end.

var a, b, i: integer;
begin
read(a);
b:=0;
for i:=1 to a do
    if a = 1 then b:=b+1;
if a = 0 then writeln('easy')
else writeln('hard');
end.

var a,i,n,x:integer;

begin
readln (n);
for x:= 1 to n do
begin
    read (i);
    a:= a+1;
    end;
if a <> 0 then
    writeln ('HARD')
    else
    writeln ('EASY');
end.

var
a:array[1..100] of integer;
i,n,s:integer;
begin
readln(n);
for i:=1 to n do read(a[i]);
for i:=1 to n do s:=s+a[i];
 if s=1 then writeln('HARD') else writeln('EASY');
end.

var n,k, i,m:integer;
begin
readln(n);
for i:=1 to n  do
begin
readln(m);
if m=1 then k:=1;
end;
if k=1 then writeln('EASY') else writeln('HARD');
end.

var n,i:integer;
    k: array[1..100] of integer;

 begin
   readln(n);
   for i:=1 to n do
      read(k[i]);
      if k[i]=0 then write('EASY')
      else write('HARD');

 end.

begin
  var n := ReadInteger;
  var a := ReadString.ToIntegers;
  if a.Any(x -> x = 1) then
    Write('HARD')
  else Write('EASY')
end.

var
  n, i, a, b: integer;

begin
  readln(n);
  for i := 1 to n do
  begin
    read(a);
    b := b + a;
  end;
  if b > 0 then
    writeln('HARD')
  else
    writeln('EAZY');
end.

var i,n,m,count:Integer;
begin
read(n);
begin
for i:= 1 to n do
read(m);
if m=1
then
inc(count);
end;
if count>0
then write('hard')
else
write('easy');
end.

var i,n,z:integer;
begin
     readln(n);
     for i:=1 to n do
     begin
          read(z);
          if z = 1 then
          begin
             write('HARD');
             exit;
          end;
     end;
     write('EAZY');
end.

program easy;
var i, n, a: integer;
begin
    readln(n);
    for i := 1 to n do begin
        readln(a);
        if a = 1 then begin
            writeln('HARD');
            exit();
        end;
    end;
    writeln('EASY');
end.

var n,i,s,a:integer;
begin
        readln(n);
        for i:= 1 to n do
        begin
                readln(a);
                s:=s+a;
        end;
        if s = 0  then writeln('EASY')
        else writeln('HARD');
readln;
end.

var n,i,a:integer;
begin
        read(n);
        for i:= 1 to n do read(a);
                if a = 0 then writeln('EASY')
                        else writeln('HARD');
end.

var a,i,o,j:integer;
begin
readln(j);
for i:=1 to j do begin
  read(a);
  if (a = 1) then begin
    writeln('HARD');
    j:= 0;
  end else begin
    writeln('EASY');
    j:= 0;
  end;
end;
end.

var
i, n, k:integer;
begin
read(n);
k:=0;
while n>0 do begin
read(k);
if i>0 then k:=1;
n:=n-1;
end;
if k=1 then writeln('HARD') else writeln('EASY');
end.

begin
  var n := ReadInteger;
  var a := ReadString.ToIntegers;
  if a.Any(x -> x = 1) then
    Print('HARD')
  else Print('EASY')
end.

program ff;
var a,b:integer;
begin
read(a);
for a:=1 to a do
read(b);
if b=1 then writeln('HARD') else  writeln('EASY');
 end.

var n,k, i,m:integer;
begin
readln(n);
for i:=1 to n  do
begin
readln(m);
if m=1 then k:=1;
end;
if k=1 then write('HARD') else write('EASY');
end.

var i,n,m,count:Integer;
begin
read(n);
begin
for i:= 1 to n do
read(m);
if m=1
then
begin
inc(count);
write('hard');
exit;
end;
 write('easy');
 end;
end.

Var a:array[1..1000] of integer;
    n,i,b:integer;
    begin
    b:=0;
    for i:=1 to n do begin
    read(a[i]);
    if a[i]=1 then begin write('hard'); b:=1; halt; end;
    end;
    if b=0 then write('easy');
    end.

var a:array[1..100]of integer;
i,n,k:integer;
begin
    readln(n);
    k:=0;
    for i:=1 to n do
    read(a[i]);
    for i:=1 to n do
    if a[i]-1=0 then inc(k);
    if k>0 then writeln('HARD');
    end.

var a,b,i:integer;
begin
i:=1;
read(a);

for i:=1 to a do begin
read(b);
if b=1 then writeln('HARD') else  writeln('EASY');
end;
 end.

var a,i,e:integer;
    s:string;
begin
  readln(a);
  readln(s);
  i:=0;
  e:=0;
  if s[1] = '1' then
   e:=e+1;
  if s[1] = '0' then
   e:=0
  else
    while (s[i] <> '1') or (i <> a) do
    begin
     if s[i] = '1' then
     e:=e+1;
     i:=1+i;
    end;
  if e = 0 then
   write('EASY')
  else
   write('HARD');
end.

program Pro2;
 Uses sysutils,StrUtils;
var
 n,otvet:string;
 a,i:integer;
 resa,l:integer;

begin
readln(n);
readln(otvet);
a:=strtoint(n);
otvet:=AnsiReplaceStr(otvet,' ','');
resa:=0;
for i:=1 to a do
begin
l:=strtoint(otvet[i]);
resa:=resa xor l;
end;
if resa=0 then writeln('EASY') else writeln('HARD');
end.

var n, i , temp:longint;

begin
    readln(n);
    for i := 1 to n do
        begin
            readln(temp);
            if temp = 1 then begin write('HARD'); exit; end;
        end;
    write('EASY');
end.

var
 n,i,x:longint;
 p,p1:boolean;
begin
 readln(n);
 for i:=1 to n do
  begin
   read(x);
   if x=0 then p:=true;
  end;
 if (p=true) then writeln('HARD')
             else writeln('EASY');
end.

var
i, n, a:integer;
begin
read(n);
for i:=1 to n do
read(a);
if a=1 then write('hard')
else write('eaze');
end.

var n,k,i:integer;
begin
	read(n);
	for i:=1 to n do
	begin
		read(k);
		if k=1 then
			begin
			writeln('HARD');
			exit;
			end;
	end;
	writeln('EAZY');
end.

var a,b,i:integer;
begin
read(a);
i:=1;
for i:=1 to a do
read(b);
if b=1 then writeln('HARD') else  writeln('EASY');
 end.

var i,n,m,count:Integer;
begin
read(n);
for i:= 1 to n do
read(m);
if m=1
then
begin
inc(count);
write('hard');
exit;
end;
if count=0
then write('easy');
end.

begin
  var n := ReadInteger;
  var a := ReadString.ToIntegers;
  if a.Any(x -> x = 1) then
    Print('HARD')
  else Print('EASY')
end.

Var a,b,c,d,q: integer;
begin
readln(c);
for d:=1 to c do
read(a);
for d:=1 to c do
if a<>0 then  q:=q+1
else q:=q+0;
if q=0 then writeln('EASY')
else writeln('HARD');
end.

program n_1;
var n, i, g: integer;
a: array [1..100] of integer;
begin
readln(n);
g:=0;
for i:=1 to n do
begin
read(a[i]);
if (a[i]=1) and (g = 0) then
begin
write('HARD');
g:=1;
end;
end;
if (i=100) then
write('EASY');
end.

var n,i,a:integer;
begin
        read(n);
        for i:= 1 to n do read(a);
                if a = 0 then writeln('EASY')
                        else writeln('HARD');
end.

var C,I,A,n:integer;
begin
 readln(n);
 c:=0;
 FOR i:=1 to n do
  begin
   read(a);
   C:=c+a;
  end;
  if c=0 then
  writeln('EASE')
  else
  writeln('HARD');
end.

var a,b,i:integer;
begin
read(a);
i:=1;
for i:=1 to a do begin
read(b);
if b=1 then writeln('HARD') else  writeln('EASY');
end;
 end.

var n:array[1..100] of integer;
   j,i,k:integer;
begin
readln(k);
j:=0;
for i:=1 to k do
begin
readln(n[i]);
j:=j+n[i];
end;
if j-1<0 then write('easy')else
write('hard');
readln;
end.

var
i, n, k:integer;
begin
read(n);
k:=0;
while n>0 do begin
read(k);
if i>0 then k:=1;
n:=n-1;
end;
if k=1 then writeln('HARD') else writeln('EASY');
end.

var
 n,i,m:integer;

begin
 readln(n);
for i:=1 to n do
 begin
  read(m);
 end;
if m=1 then
  begin
   writeln('Hard');
 end
else
 writeln('EASY');
end.

var
 n,i,m:integer;
begin
 readln(n);
for i:=1 to n do
 begin
  read(m);
 end;
if m=1 then
   writeln('Hard')
else
 writeln('EASY');
end.