class Electricity_Bill
{
public static void main(String args[])
{
Scanner sc = new Scanner (System.in);
int units;
double bill;
System.out.println("Enter the Number of units consumed:");
units=sc.nextInt();
if(units<=100)
bill=units*0.40;
else if(units<=200)
bill=(100*0.40)+(units-100)*0.50;
else
bill=(100*0.40)+(100*0.50)+(units-200)*0.60;
System.out.println("Total Charge of Electricity Bill="+bill);
}
}