Code A,B = map(str,input().split()) g1,s1,k1 = A.split('.') g2,s2,k2 = B.split('.') g = int(g1)+int(g2) s = int(s1)+int(s2) k = int(k1)+int(k2) if k>=29: s+=1 k%=29 if s>=17: g+=1 s%=17 print(str(g)+'.'+str(s)+'.'+str(k))