#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int M, N;
    cin >> M >> N;

    double ans = 1.0 * (M * 3 + N) / 3.0;
    printf("%0.9f\n", ans);

    return 0;
}