Score : 500 points
Snuke has a string s. From this string, Anuke, Bnuke, and Cnuke obtained strings a, b, and c, respectively, as follows:
?
s.For example, if s is mississippi
, we can choose the substring ssissip
and replace its 1-st and 3-rd characters with ?
to obtain ?s?ssip
.
You are given the strings a, b, and c. Find the minimum possible length of s.
?
s.Input is given from Standard Input in the following format:
a b c
Print the minimum possible length of s.
a?c der cod
7
For example, s could be atcoder
.
atcoder atcoder ???????
7
a, b, and c may not be distinct.