import java.util.Calendar;
import java.util.Date;
class Main{
public static int calculateMonthDistance(Date start, Date end) {
int year1 = getYear(start);
int year2 = getYear(end);
int month1 = getMonth(start);
int month2 = getMonth(end);
return 12 * (year1 - year2) + (month1 - month2);
}
public static int getYear(Date date) {
Calendar cal = Calendar.getInstance();
cal.setTime(date);
return cal.get(Calendar.YEAR);
}
public static int getMonth(Date date) {
Calendar cal = Calendar.getInstance();
cal.setTime(date);
return cal.get(Calendar.MONTH);
}
}