import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class DieTeria { static Map lastDay = new HashMap() { { put(1, 31); put(2, 28); put(3, 31); put(4, 30); put(5, 31); put(6, 30); put(7, 31); put(8, 31); put(9, 30); put(10, 31); put(11, 30); put(12, 31); } }; static int n = 2; public static void main(String[] args) { // 標準入力から読み込む際に、Scannerオブジェクトを使う。 Scanner sc = new Scanner(System.in); String s = sc.next(); int year = Integer.parseInt(s.split("/")[0]); int month = Integer.parseInt(s.split("/")[1]); int day = Integer.parseInt(s.split("/")[2]); if (isUruu(year)) { lastDay.put(2, 29); } day += n; if (isOver(month, day)) { month++; while (isOver(month, day)) { day--; } } if(month == 13) { month =12; year++; } System.out.println(String.format("%04d/%02d/%02d", year, month, day)); } static boolean isUruu(int year) { if (year / 400 == 0) { return false; } else if (year / 4 == 0) { return true; } return false; } static boolean isLastDay(int month, int day) { return (day == lastDay.get(month)); } static boolean isOver(int month, int day) { return (day > lastDay.get(month)); } static boolean isLastMonth(int month) { return (month == 12); } }