X, Y = input().split() Z = (int(X+Y))/2 - 6 print(Z)