M,N = map(int, input().split()) print(M + N/3)