#include using namespace std; int main() { int m, n; cin >> m >> n; cout << fixed << setprecision(8) << (m + n / 3.) << endl; return 0; }