s = io.read() y, m, d = string.match(s, "(%d+)/(%d+)/(%d+)") y, m, d = tonumber(y), tonumber(m), tonumber(d) mod = 31 if(m == 4 or m == 6 or m == 9 or m == 11) then mod = 30 elseif(m == 2) then if(y % 400 == 0) then mod = 29 elseif(y % 100 == 0) then mod = 28 elseif(y % 4 == 0) then mod = 29 else mod = 28 end end d = d + 2 if(mod < d) then d = d - mod m = m + 1 if(m == 13) then m, y = 1, y + 1 end end io.write(string.format("%d/%02d/%02d\n", y, m, d))