pragma solidity ^0.5.0;

contract ERC20 {
// Safemath
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");

return c;
}

function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
uint256 c = a - b;

return c;
}

function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return uint256(0);
}

uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");

return c;
}

function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: division by zero");
uint256 c = a / b;
return c;
}

function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0, "SafeMath: modulo by zero");
return a % b;
}

// // real contract
mapping (address => uint256) private _balances;

mapping (address => mapping (address => uint256)) private _allowances;

uint256 private _totalSupply;

function totalSupply() public view returns (uint256) {
return _totalSupply;
}

function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}

function _transfer(address _sender, address recipient, uint256 amount) internal {
require(_sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");

_balances[_sender] = sub(_balances[_sender], amount);
_balances[recipient] = add(_balances[recipient], amount);
}

function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
}

function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}

function _approve(address owner, address spender, uint256 value) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");

_allowances[owner][spender] = value;
}

function approve(address spender, uint256 value) public returns (bool) {
_approve(msg.sender, spender, value);
return true;
}

function transferFrom(address _sender, address recipient, uint256 amount) public returns (bool) {
_transfer(_sender, recipient, amount);
_approve(_sender, msg.sender, sub(_allowances[_sender][msg.sender], amount));
return true;
}

function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(msg.sender, spender, add(_allowances[msg.sender][spender], addedValue));
return true;
}

function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(msg.sender, spender, sub(_allowances[msg.sender][spender], subtractedValue));
return true;
}

function _mint(address account, uint256 amount) internal {
require(account != address(0), "ERC20: mint to the zero address");

_totalSupply = add(_totalSupply, amount);
_balances[account] = add(_balances[account], amount);
}

function _burn(address account, uint256 value) internal {
require(account != address(0), "ERC20: burn from the zero address");

_balances[account] = sub(_balances[account], value);
_totalSupply = sub(_totalSupply, value);
}

function _burnFrom(address account, uint256 amount) internal {
_burn(account, amount);
_approve(account, msg.sender, sub(_allowances[account][msg.sender], amount));
}

}