import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); String[] sp = s.split("/", 0); int[] days = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int y = Integer.parseInt(sp[0]); int m = Integer.parseInt(sp[1]); int d = Integer.parseInt(sp[2]); if((y % 4 == 0) && !((y % 100 == 0) && (y % 400 != 0))) days[2] = 29; String ans = ""; if((d + 2) <= days[m]) { String sm = String.valueOf(m); String sd = String.valueOf(d + 2); if(m < 10) sm = "0" + sm; if(d < 8) sd = "0" + sd; ans = y + "/" + sm + "/" + sd; } else { int rd = d + 2 - days[m]; if(m < 12) { String sm = String.valueOf(m + 1); if(m < 9) sm = "0" + sm; ans = y + "/" + sm + "/" + "0" + rd; } else { ans = (y + 1) + "/01/" + "0" + rd; } } System.out.println(ans); } }