#!/usr/bin/python2
# -*- coding: utf-8 -*-
# †
m, n = map(int, raw_input().split())
res = m + float(n) / 3 
print res