#include <bits/stdc++.h>
using namespace std;
int mp[8] = {0, 1, 2, 3, 1, 3, 2, 1};
int a[5];
int main() {
  cin >> a[1] >> a[2] >> a[3];
  int ans = 0;
  for (int i = 1; i <= 7; i++) {
    int p = min(a[1] / 3, min(a[2] / 2, a[3] / 2));
    int d[4] = {0, a[1] - 3 * p, a[2] - 2 * p, a[3] - 2 * p};
    int c = 7 * p;
    for (int j = 1; j <= 7; j++) {
      if (d[mp[j]])
        d[mp[j]]--, c++;
      else
        break;
    }
    a[mp[i]]++;
    ans = max(ans, c - i + 1);
  }
  cout << ans << endl;
  return 0;
}
