package zys;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Scanner;
public class Zy {
public static void main(String[] args) throws ParseException {
System.out.println("输入生产日期");
Scanner input=new Scanner(System.in);
String s=input.nextLine();
SimpleDateFormat f=new SimpleDateFormat("yyyy-MM-dd");
Date date=f.parse(s);
Calendar c=Calendar.getInstance();
Calendar c1=Calendar.getInstance();
c.setTime(date);
c.add(Calendar.DATE, 7);
int a=c.get(Calendar.DAY_OF_MONTH);
int b=c1.get(Calendar.DAY_OF_MONTH);
if(a>b) {
System.out.println(a-b+"天后过期");
}else {
System.out.println("食品过期");
}
}
}