# そのまま期待値を計算するとM+N/3になるけどそれでいいのか M, N = map(int, input().split()) ans = M + (N/3) print(ans)