#include <bits/stdc++.h>
using namespace std;
template <typename T>
bool uin(T &a, T b) {
  return a > b ? (a = b, true) : false;
}
template <typename T>
bool uax(T &a, T b) {
  return a < b ? (a = b, true) : false;
}
template <typename T>
T Min(T a, T b) {
  return a > b ? b : a;
}
template <typename T>
T Max(T a, T b) {
  return a < b ? b : a;
}
template <typename T>
void de(T a) {}
const int INF = 2e5 + 1;
const int mod = 1e9 + 7;
int a, b, c;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(10);
  cout << fixed;
  cin >> a >> b >> c;
  vector<int> weekdays = {1, 2, 3, 1, 3, 2, 1};
  int weeks = Min(a / 3, Min(b / 2, c / 2));
  a = a - weeks * 3;
  b = b - weeks * 2;
  c = c - weeks * 2;
  int days = 0;
  de(a);
  de(b);
  de(c);
  for (int i = 0; i < (int)(7); ++i) {
    int temp_a = a, temp_b = b, temp_c = c;
    int index = i, current_days = 0;
    while (true) {
      if (weekdays[index] == 1) {
        if (temp_a > 0)
          temp_a--;
        else
          break;
      }
      if (weekdays[index] == 2) {
        if (temp_b > 0)
          temp_b--;
        else
          break;
      }
      if (weekdays[index] == 3) {
        if (temp_c > 0)
          temp_c--;
        else
          break;
      }
      index++;
      current_days++;
      index = index % 7;
    }
    uax(days, current_days);
    de(days);
  }
  cout << weeks * 7 + days << endl;
  return 0;
}
