import java.util.*;
public class Salary
{
public static void main(String [] args)
{
Scanner input = new Scanner(System.in);
System.out.println("Enter Base Pay of the employee in hours(base pay always > 50)");
int basePay = input.nextInt();
double pay=0;
if(basePay<50)
{
System.out.println("Entered Wrong BasePay ");
return;
}
System.out.println("Enter no. of hours he Worked in a week(hours always < 60) ");
int hours = input.nextInt();
if(hours>60||hours<0)
{
System.out.println("Entered Wrong no. of hours");
return;
}
if(hours>0&&hours<=35)
{
pay = hours*basePay;
System.out.println(" Pay = "+pay);
}
else
{
pay = 35*basePay+(hours-35)*1.5*basePay;
System.out.println(" Pay = "+pay);
}
}
}