So, a little update:
I found an answer, but i really don't like it, because I make Done check 2 times. I'm sure there is some better way.
Here is the while cycle:
String input ="";
while (!input.equals("Done")) {
System.out.print("Enter number of boxes ");
input = scanner.nextLine();
if (!input.equals("Done")) {
int numberOfBoxes = Integer.parseInt(input);
//1 box = 1 cubic meeter
totalUsedSpace = totalUsedSpace + numberOfBoxes;
if (houseVolume <= totalUsedSpace) {
int spaceNeeded = totalUsedSpace - houseVolume;
System.out.println("No more free space! You need " + spaceNeeded + " Cubic meters more");
notEnoughtSpace = true;
break;
}
}
}