M,N = map(int,input().split()) ans = M + N / 3 print('%.09f' % ans)