#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
int main() {
  std::string myText;
  std::ifstream Meminfo("/proc/meminfo");
  std::string uptimeText;
  std::ifstream Uptime("/proc/uptime");
  std::string distro;
  std::ifstream OsRelease("/etc/os-release");
  long total = 0;
  long available = 0;
  while (std::getline (Meminfo, myText)) {
    std::istringstream ss(myText);
    std::string name;
    long value;
    ss >> name >> value;
    if (name == "MemTotal:") {
      total = value;
    }
    if (name == "MemAvailable:") {
      available = value;
    }
  }
  std::string osLine;
  while (std::getline(OsRelease, osLine)) {
    size_t pos = osLine.find('=');
    if (pos == std::string::npos) continue;
    std::string key = osLine.substr(0, pos);
    std::string val = osLine.substr(pos + 1);
    if (key == "PRETTY_NAME") {
      distro = val.substr(1, val.size() - 2);
    }
  }
  long timeup = 0;
  while (std::getline (Uptime, uptimeText)) {
    std::istringstream ss2(uptimeText);
    double uptime;
    ss2 >> uptime;
    timeup = uptime; 
  }
  std::cout << std::fixed << std::setprecision(2);
  std::cout << "Used: " << (total - available) / (1024.0 * 1024.0) << " GB" << "/" << total / (1024.0 * 1024.0) << "GB"  << std::endl;
  std::cout << "Uptime: " << "Hours: " << timeup / 3600 << " Minutes: " << (timeup % 3600) / 60 << std::endl;
  std::cout << "OS: " << distro << std::endl;
  Meminfo.close();
}
