import java.util.Calendar;
import java.util.*;
import java.text.*;
public class LastDay{
public static void main(String args[]){
Date date = new Date();
GregorianCalendar gc = new GregorianCalendar();
gc.add(GregorianCalendar.MONTH,1);
gc.add(GregorianCalendar.DATE,-date.getDate());
DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT);
Date dateTemp = gc.getTime();
String s = df.format(dateTemp);
System.out.println(s);
}
}