class Grade
{
public static void main(String args[])
{
Scanner sc = new Scanner (System.in);
double per;
int phy,che,bio,math,com,tol;
System.out.println("Enter the 5 subjects marks");
System.out.println("PHYSICS,CHEMISTRY,BIOLOGY,MATH,COMPUTER");
phy=sc.nextInt();
che=sc.nextInt();
bio=sc.nextInt();
math=sc.nextInt();
com=sc.nextInt();
tol=phy+che+bio+math+com;
per=tol/5.0;
System.out.println("ToTal Marks="+tol);
System.out.println("Percentage="+per);
System.out.print("Grade= ");
if(per>=80)
System.out.println("E+");
else if(per>=70 && per<80)
System.out.println("E");
else if(per>=60 && per<70)
System.out.println("A+");
else if(per>=50 && per<60)
System.out.println("A");
else if(per>=40 && per<50)
System.out.println("B");
else
System.out.println("Fail");
}
}