#include <bits/stdc++.h>
using namespace std;
const int size = 3e+5 + 7;
int arr[size];
set<int> t;
int main() {
  int a, b, c, i = 0;
  long long int ans = 0;
  cin >> a >> b >> c;
  vector<int> v = {0, 0, 1, 2, 0, 2, 1}, arr = {a, b, c};
  while (i < 7) {
    arr = {a, b, c};
    long long int count = 0;
    for (int x = 0; x < 7; x++) {
      if (arr[v[(i + x) % 7]] > 0) {
        count++;
        arr[v[(x + i) % 7]]--;
        long long int g = min({arr[0] / 3, arr[1] / 2, arr[2] / 2});
        g *= 7;
        ans = max(ans, g + count);
      } else
        break;
    }
    ans = max(ans, count);
    i++;
  }
  cout << ans;
  return 0;
}
