Java program calculation to fill the bucket with the water mug

Java program calculation to fill the bucket with the water mug. A bucket with a capacity of x litres is expected to be filled with a cup with a capacity of y millilitres. If x=50 and y=5, the bucket will be filled with a minimum of 6 mugs.

import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter the values");
int bucketCap = sc.nextInt();
if(bucketCap>0) {
int mugCap = sc.nextInt();
if(mugCap>0){
double fullbucket = bucketCap*0.8;
int fill=0;
System.out.println("Enter big numbers");
while (fill<fullbucket){
int a = sc.nextInt();
if(a<=mugCap){
fill +=a;
}
else {
System.out.println("Invalid");
}
}

}
else {
System.out.println("Invalid");
}
}
else {
System.out.println("Invalid");
}
}
}

 

Output:

Enter the values
2
2
Enter big numbers
45
Invalid