m, n = map(int, input().split()) ans = m + n / 3 print(ans)