#include <bits/stdc++.h>
using namespace std;
long long mx(long long a, long long b) {
  if (a <= b) {
    return b;
  } else {
    return a;
  }
}
long long mn(long long a, long long b) {
  if (a <= b) {
    return a;
  } else {
    return b;
  }
}
long long binpow(long long n, long long k, long long mod) {
  long long res = 1;
  while (k > 0) {
    if (k & 1) {
      res = (res * n) % mod;
    }
    n = (n * n) % mod;
    k >>= 1;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long d, x, y;
void extendedEuclid(long long A, long long B) {
  if (B == 0) {
    d = A;
    x = 1;
    y = 0;
  } else {
    extendedEuclid(B, A % B);
    long long temp = x;
    x = y;
    y = temp - (A / B) * y;
  }
}
long long modInverse(long long A, long long M) {
  extendedEuclid(A, M);
  return (x % M + M) % M;
}
long long modInverse2(long long A, long long M) { return binpow(A, M - 2, M); }
long long cntprimes = 0;
vector<bool> sieve(long long l, long long r) {
  vector<bool> isPrime(r - l + 1, 1);
  for (long long i = 2; i * i <= r; ++i) {
    for (long long j = mx(i * i, (l + (i - 1)) / i * i); j <= r; j += i) {
      isPrime[j - l] = false;
    }
  }
  for (long long i = mx(l, 2); i <= r; ++i) {
    if (isPrime[i - l]) {
      cntprimes++;
    }
  }
  return isPrime;
}
long long numdivisors = 1;
vector<long long> factorize(long long n) {
  vector<long long> res;
  for (long long i = 2; i * i <= n; ++i) {
    long long c = 0;
    while (n % i == 0) {
      res.push_back(i);
      n /= i;
      c++;
    }
    numdivisors *= (c + 1);
  }
  if (n != 1) {
    res.push_back(n);
    numdivisors *= (2);
  }
  return res;
}
vector<long long> factorizeminprime(long long n) {
  vector<long long> minPrime(n + 1);
  for (long long i = 2; i * i <= n; ++i) {
    if (minPrime[i] == 0) {
      for (long long j = i * i; j <= n; j += i) {
        if (minPrime[j] == 0) {
          minPrime[j] = i;
        }
      }
    }
  }
  for (long long i = 2; i <= n; ++i) {
    if (minPrime[i] == 0) {
      minPrime[i] = i;
    }
  }
  vector<long long> res;
  while (n != 1) {
    res.push_back(minPrime[n]);
    n /= minPrime[n];
  }
  return res;
}
bool isprime(long long n) {
  for (long long i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
long long phi(long long n) {
  long long result = n;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      while (n % i == 0) n /= i;
      result -= result / i;
    }
  }
  if (n > 1) result -= result / n;
  return result;
}
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  set<pair<long long, long long> > s;
  for (int i = 0; i < 1001; i++) {
    s.insert({i * 2, i * 4});
  }
  b -= b % 2;
  c -= c % 4;
  while (a) {
    if (s.find({a * 2, a * 4}) != s.end() && a * 2 <= b && a * 4 <= c) {
      break;
    } else
      a--;
  }
  cout << a + a * 2 + a * 4;
}
