m, n = map(int, raw_input().split()) print '%.9f' % (m + 1.0 * n / 3)