#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, res, m = 0;
  cin >> a >> b >> c;
  res = min(min(a / 3, b / 2), c / 2);
  a -= res * 3;
  b -= res * 2;
  c -= res * 2;
  string s = "abcacbaabcacba";
  for (int i = 0; i < 7; i++) {
    int vis[3], cnt = 0;
    vis[0] = a;
    vis[1] = b;
    vis[2] = c;
    for (int j = i; j < i + 7; j++) {
      if (vis[s[j] - 'a']) {
        cnt++;
        vis[s[j] - 'a']--;
      } else
        break;
    }
    m = max(m, cnt);
  }
  cout << res * 7 + m;
  return 0;
}
