#include using namespace std; int N, M; int main() { cin >> N >> M; cout << fixed << setprecision(15) << N + M / 3.0 << endl; return 0; }